From 341db2ada3959e18230a4904de0e8db18575fd0a Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Fri, 7 May 2021 15:58:57 -0700 Subject: [PATCH] process qt events to allow scene to initialize Signed-off-by: Steve Peters --- test/integration/scene3d.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/integration/scene3d.cc b/test/integration/scene3d.cc index 78fac6d10..5a78cc096 100644 --- a/test/integration/scene3d.cc +++ b/test/integration/scene3d.cc @@ -95,6 +95,15 @@ TEST(Scene3DTest, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(Config)) auto engine = rendering::engine("ogre"); ASSERT_NE(nullptr, engine); + int sleep = 0; + int maxSleep = 30; + while (0 == engine->SceneCount() && sleep < maxSleep) + { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + QCoreApplication::processEvents(); + sleep++; + } + EXPECT_EQ(1u, engine->SceneCount()); auto scene = engine->SceneByName("banana"); ASSERT_NE(nullptr, scene);