tables: use omero.repo.wait rather than SECONDS_SLEEP#5615
Merged
joshmoore merged 2 commits intoome:developfrom Jan 17, 2018
Merged
tables: use omero.repo.wait rather than SECONDS_SLEEP#5615joshmoore merged 2 commits intoome:developfrom
joshmoore merged 2 commits intoome:developfrom
Conversation
The previous loop checked for the elapsed time to see whether waiting was necessary. The with- wait method doesn't have access to the elapsed time and so should run unconditionally.
Member
Author
|
Opening this because it should prevent training etc. from failing. However, |
8e8ae21 to
660fdbf
Compare
Having each method call _do_with_wait makes it difficult to use the context of the loop. This re-simplifies the individual methods in favor of a more explicit loop.
660fdbf to
a2af2a8
Compare
Member
|
Works fine from running local tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous loop checked for the elapsed time
to see whether waiting was necessary. The with-
wait method doesn't have access to the elapsed
time and so should run unconditionally.
Testing this PR
Testing is difficult since tables initialization needs to fail. If it fails, then several seconds should be waited. I tested locally by modifying https://github.com/openmicroscopy/openmicroscopy/blob/develop/components/tools/OmeroPy/test/unit/tablestest/test_servants.py#L27 and causing the method to fail.
Related reading
See #5593