Skip to content

Commit

Permalink
InteractiveRenderTests : Wait longer after stopping render
Browse files Browse the repository at this point in the history
I wrongly thought that a single `assertCalled()` was sufficient, but there may be several UI thread calls involved in render shutdown.
  • Loading branch information
johnhaddon committed Nov 9, 2023
1 parent fd1935a commit bf248a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion python/GafferArnoldTest/InteractiveArnoldRenderTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ def testEditLightGroups( self ) :
# that it is no longer rendering.

script["renderer"]["state"].setValue( script["renderer"].State.Stopped )
self.uiThreadCallHandler.assertCalled() # Wait for saving to complete
self.uiThreadCallHandler.waitFor( 0.5 ) # Wait for saving to complete

self.assertEqual( len( script["catalogue"]["images"] ), 1 )
self.assertNotIn( "gaffer:isRendering", script["catalogue"]["out"].metadata() )
Expand Down
8 changes: 1 addition & 7 deletions python/GafferSceneTest/InteractiveRenderTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2145,13 +2145,7 @@ def testEditCropWindow( self ) :
self.assertEqual( script["catalogue"]["out"].metadata()["gaffer:isRendering"], IECore.BoolData( True ) )

script["renderer"]["state"].setValue( script["renderer"].State.Stopped )
self.uiThreadCallHandler.assertCalled() # Wait for saving to complete

if script["renderer"].typeName() == "GafferCycles::InteractiveCyclesRender" :
# Cycles somehow manages to do stuff after we've deleted the CyclesRenderer.
# Wait for it to finish.
## \todo Figure out why this is needed, and fix it.
self.uiThreadCallHandler.waitFor( 1 )
self.uiThreadCallHandler.waitFor( 0.5 ) # Wait for saving to complete

self.assertNotIn( "gaffer:isRendering", script["catalogue"]["out"].metadata() )

Expand Down

0 comments on commit bf248a4

Please sign in to comment.