Skip to content

Commit

Permalink
test timing
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <ichen@openrobotics.org>
  • Loading branch information
iche033 committed Aug 18, 2023
1 parent 5ff543a commit 9721afe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/integration/transport_scene_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ TEST(TransportSceneManagerTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))
// Show, but don't exec, so we don't block
win->QuickWindow()->show();

// get render engine after window is shown
auto engine = gz::gui::testing::getRenderEngine("ogre2");
ASSERT_NE(nullptr, engine);

int sleep = 0;
int maxSleep = 30;
while (!sceneRequested && sleep < maxSleep)
Expand All @@ -166,10 +170,6 @@ TEST(TransportSceneManagerTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config))
EXPECT_TRUE(sceneRequested);
EXPECT_LT(sleep, maxSleep);

// get render engine after window is shown
auto engine = gz::gui::testing::getRenderEngine("ogre2");
ASSERT_NE(nullptr, engine);

auto scene = engine->SceneByName("banana");
ASSERT_NE(nullptr, scene);

Expand Down

0 comments on commit 9721afe

Please sign in to comment.