Skip to content

Commit

Permalink
IECoreScene tests : Tighten up a couple test timings
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldresser-ie committed Nov 27, 2023
1 parent 85f9bca commit 33fa6df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/IECoreScene/MeshAlgoTriangulateTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,14 +295,14 @@ def backgroundRun():
startTime = time.time()
thread.start()

time.sleep( 0.1 )
time.sleep( 0.01 )
canceller.cancel()
thread.join()

# This test should actually produce a time extremely close to the sleep duration ( within
# 0.01 seconds whether the sleep duration is 0.01 seconds or 1 seconds ), but checking
# that it terminates with 0.1 seconds is a minimal performance bar
self.assertLess( time.time() - startTime, 0.2 )
self.assertLess( time.time() - startTime, 0.11 )
self.assertTrue( cancelled[0] )

if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion test/IECoreScene/PrimitiveTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def backgroundRun():
startTime = time.time()
thread.start()

time.sleep( 0.05 )
time.sleep( 0.01 )
canceller.cancel()
thread.join()

Expand Down

0 comments on commit 33fa6df

Please sign in to comment.