diff options
author | nga <[email protected]> | 2022-02-10 16:48:09 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:48:09 +0300 |
commit | 1f553f46fb4f3c5eec631352cdd900a0709016af (patch) | |
tree | a231fba2c03b440becaea6c86a2702d0bfb0336e /library/cpp/messagebus/scheduler/scheduler_ut.cpp | |
parent | c4de7efdedc25b49cbea74bd589eecb61b55b60a (diff) |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/messagebus/scheduler/scheduler_ut.cpp')
-rw-r--r-- | library/cpp/messagebus/scheduler/scheduler_ut.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/library/cpp/messagebus/scheduler/scheduler_ut.cpp b/library/cpp/messagebus/scheduler/scheduler_ut.cpp index a5ea641c108..35fcccdd29f 100644 --- a/library/cpp/messagebus/scheduler/scheduler_ut.cpp +++ b/library/cpp/messagebus/scheduler/scheduler_ut.cpp @@ -1,36 +1,36 @@ #include <library/cpp/testing/unittest/registar.h> - -#include "scheduler.h" - + +#include "scheduler.h" + #include <library/cpp/messagebus/misc/test_sync.h> - -using namespace NBus; -using namespace NBus::NPrivate; - + +using namespace NBus; +using namespace NBus::NPrivate; + Y_UNIT_TEST_SUITE(TSchedulerTests) { - struct TSimpleScheduleItem: public IScheduleItem { - TTestSync* const TestSync; - - TSimpleScheduleItem(TTestSync* testSync) - : IScheduleItem((TInstant::Now() + TDuration::MilliSeconds(1))) - , TestSync(testSync) + struct TSimpleScheduleItem: public IScheduleItem { + TTestSync* const TestSync; + + TSimpleScheduleItem(TTestSync* testSync) + : IScheduleItem((TInstant::Now() + TDuration::MilliSeconds(1))) + , TestSync(testSync) { } - + void Do() override { - TestSync->WaitForAndIncrement(0); - } - }; - + TestSync->WaitForAndIncrement(0); + } + }; + Y_UNIT_TEST(Simple) { - TTestSync testSync; - - TScheduler scheduler; - - scheduler.Schedule(new TSimpleScheduleItem(&testSync)); - - testSync.WaitForAndIncrement(1); - - scheduler.Stop(); - } -} + TTestSync testSync; + + TScheduler scheduler; + + scheduler.Schedule(new TSimpleScheduleItem(&testSync)); + + testSync.WaitForAndIncrement(1); + + scheduler.Stop(); + } +} |