From 63ef43801f80168a4053dea75c431ca8e305692e Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Thu, 26 May 2022 21:24:02 -0500 Subject: [PATCH] Force processing events Signed-off-by: Michael Carroll --- src/MainWindow_TEST.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MainWindow_TEST.cc b/src/MainWindow_TEST.cc index 62ef86aba..c5c12e21d 100644 --- a/src/MainWindow_TEST.cc +++ b/src/MainWindow_TEST.cc @@ -720,6 +720,8 @@ TEST(MainWindowTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ApplyConfig)) auto mainWindow = new MainWindow; ASSERT_NE(nullptr, mainWindow); + app.processEvents(QEventLoop::ExcludeUserInputEvents); + // Default config { auto c = mainWindow->CurrentWindowConfig(); @@ -750,7 +752,7 @@ TEST(MainWindowTest, GZ_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ApplyConfig)) EXPECT_TRUE(mainWindow->ApplyConfig(c)); } - std::this_thread::sleep_for(std::chrono::milliseconds(50)); + app.processEvents(QEventLoop::ExcludeUserInputEvents); // Check applied config {