File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -362,6 +362,9 @@ TEST_F(PenLayerTest, DrawLine)
362362
363363TEST_F (PenLayerTest, Stamp)
364364{
365+ static const std::chrono::milliseconds timeout (5000 );
366+ auto startTime = std::chrono::steady_clock::now ();
367+
365368 PenLayer penLayer;
366369 penLayer.setWidth (480 );
367370 penLayer.setHeight (360 );
@@ -371,7 +374,9 @@ TEST_F(PenLayerTest, Stamp)
371374
372375 ProjectLoader loader;
373376 loader.setFileName (" stamp_env.sb3" );
374- loader.start (); // wait until it loads
377+
378+ while (loader.loadStatus () != ProjectLoader::LoadStatus::Loaded)
379+ ASSERT_LE (std::chrono::steady_clock::now (), startTime + timeout);
375380
376381 EXPECT_CALL (engine, stageWidth ()).WillRepeatedly (Return (480 ));
377382 EXPECT_CALL (engine, stageHeight ()).WillRepeatedly (Return (360 ));
You can’t perform that action at this time.
0 commit comments