IECoreScene tests : Tighten up a couple test timings #1398
Merged
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.
I'm not sure what the correct solution here is long term. John suggested simply removing the wait entirely, and setting the canceller as cancelled before launching the thread we are cancelling. That doesn't really test the right thing though ... we want to make sure that something is still listening for cancellation once the code has had a chance to get into an inner loop.
Without confidence in an ideal solution, I've just made the test timing much tighter, which is probably enough to get the tests passing.
In the case of Triangulate at least, I suspect that what went wrong may be related to actual optimizations that reduced the runtime of the triangulate enough that the wait was too long.
I'm hoping that these values are good enough to stop seeing failures currently, though I'm open to other proposals for the long term.