This is an automated email from the ASF dual-hosted git repository. pnoltes pushed a commit to branch feature/scheduled_event_on_event_thread in repository https://gitbox.apache.org/repos/asf/celix.git
commit 1c5ecf3663facf0f6033f148fbd8c6687f5c1550 Author: Pepijn Noltes <[email protected]> AuthorDate: Sat Jun 24 07:13:09 2023 +0200 Relax timing error in sched test suite --- libs/framework/gtest/src/ScheduledEventTestSuite.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/framework/gtest/src/ScheduledEventTestSuite.cc b/libs/framework/gtest/src/ScheduledEventTestSuite.cc index 023b5c3d..e9f84325 100644 --- a/libs/framework/gtest/src/ScheduledEventTestSuite.cc +++ b/libs/framework/gtest/src/ScheduledEventTestSuite.cc @@ -127,8 +127,8 @@ TEST_F(ScheduledEventTestSuite, ScheduledEventTest) { long eventId = celix_bundleContext_scheduleEvent(ctx->getCBundleContext(), &opts); EXPECT_GE(eventId, 0); - // Then count becomes 3 or more within the initial delay + 2 x internal and an allowed error margin - int allowedTimeInMs = 10 + (2 * 20) + ALLOWED_ERROR_MARGIN_IN_MS; + // Then count becomes 3 or more within the initial delay + 2 x internal and an allowed error margin (3x) + int allowedTimeInMs = 10 + (2 * 20) + (3*ALLOWED_ERROR_MARGIN_IN_MS); waitFor([&]() { return info.count.load() >= 3; }, std::chrono::milliseconds{allowedTimeInMs}); EXPECT_GE(info.count.load(), 3);
