diff options
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/tests/proton/common/timer/timer_test.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/searchcore/src/tests/proton/common/timer/timer_test.cpp b/searchcore/src/tests/proton/common/timer/timer_test.cpp index 63b4a1a6bf3..56bad3981c9 100644 --- a/searchcore/src/tests/proton/common/timer/timer_test.cpp +++ b/searchcore/src/tests/proton/common/timer/timer_test.cpp @@ -7,6 +7,7 @@ #include <vespa/vespalib/util/count_down_latch.h> #include <vespa/vespalib/util/threadstackexecutor.h> #include <vespa/vespalib/util/lambdatask.h> +#include <vespa/vespalib/testkit/time_bomb.h> #include <thread> using vespalib::Executor; @@ -83,6 +84,7 @@ TYPED_TEST(ScheduledExecutorTest, test_drop_handle) { } TYPED_TEST(ScheduledExecutorTest, test_only_one_instance_running) { + vespalib::TimeBomb time_bomb(60s); vespalib::Gate latch; std::atomic<uint64_t> counter = 0; auto handleA = this->timer->scheduleAtFixedRate(makeLambdaTask([&]() { counter++; latch.await();}), 0ms, 1ms); @@ -94,6 +96,7 @@ TYPED_TEST(ScheduledExecutorTest, test_only_one_instance_running) { } TYPED_TEST(ScheduledExecutorTest, test_sync_delete) { + vespalib::TimeBomb time_bomb(60s); vespalib::Gate latch; std::atomic<uint64_t> counter = 0; std::atomic<uint64_t> reset_counter = 0; |