Skip to content

Commit d6b435a

Browse files
danieldresser-iejohnhaddon
authored andcommitted
IECoreScene tests : Tighten up a couple test timings
1 parent b985d9f commit d6b435a

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

contrib/IECoreAlembic/test/IECoreAlembic/AlembicSceneTest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ def backgroundRun():
19291929
startTime = time.time()
19301930
thread.start()
19311931

1932-
time.sleep( 0.05 )
1932+
time.sleep( 0.01 )
19331933
canceller.cancel()
19341934
thread.join()
19351935

src/IECoreScene/MeshAlgoTriangulate.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,9 @@ MeshPrimitivePtr MeshAlgo::triangulate(
315315
throw InvalidArgumentException( "MeshAlgo::triangulate : Mesh with invalid primitive variables" );
316316
}
317317

318+
// arePrimitiveVariablesValid is expensive enough that we should check the canceller after running it.
319+
Canceller::check( canceller );
320+
318321
// already triangulated
319322
if ( mesh->maxVerticesPerFace() == 3 )
320323
{

test/IECoreScene/MeshAlgoTriangulateTest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,13 @@ def backgroundRun():
295295
startTime = time.time()
296296
thread.start()
297297

298-
time.sleep( 0.1 )
298+
time.sleep( 0.01 )
299299
canceller.cancel()
300300
thread.join()
301301

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

test/IECoreScene/PrimitiveTest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def backgroundRun():
202202
startTime = time.time()
203203
thread.start()
204204

205-
time.sleep( 0.05 )
205+
time.sleep( 0.01 )
206206
canceller.cancel()
207207
thread.join()
208208

0 commit comments

Comments
 (0)