diff options
author | a-romanov <a-romanov@yandex-team.ru> | 2022-02-10 16:48:11 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:11 +0300 |
commit | 0f4c5d1e8c0672bf0a1f2f2d8acac5ba24772435 (patch) | |
tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/actors/testlib | |
parent | aa2986a34bde73b2cdcea5080c4443b7cf2ba686 (diff) | |
download | ydb-0f4c5d1e8c0672bf0a1f2f2d8acac5ba24772435.tar.gz |
Restoring authorship annotation for <a-romanov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/actors/testlib')
-rw-r--r-- | library/cpp/actors/testlib/test_runtime.cpp | 40 | ||||
-rw-r--r-- | library/cpp/actors/testlib/test_runtime.h | 10 |
2 files changed, 25 insertions, 25 deletions
diff --git a/library/cpp/actors/testlib/test_runtime.cpp b/library/cpp/actors/testlib/test_runtime.cpp index 8df586041e..6fa25b9965 100644 --- a/library/cpp/actors/testlib/test_runtime.cpp +++ b/library/cpp/actors/testlib/test_runtime.cpp @@ -62,9 +62,9 @@ namespace NActors { } void TTestActorRuntimeBase::TNodeDataBase::Stop() { - if (Poller) - Poller->Stop(); - + if (Poller) + Poller->Stop(); + if (MailboxTable) { for (ui32 round = 0; !MailboxTable->Cleanup(); ++round) Y_VERIFY(round < 10, "cyclic event/actor spawn while trying to shutdown actorsystem stub"); @@ -72,7 +72,7 @@ namespace NActors { if (ActorSystem) ActorSystem->Stop(); - + ActorSystem.Destroy(); Poller.Reset(); } @@ -684,37 +684,37 @@ namespace NActors { TTestActorRuntimeBase::TEventObserver TTestActorRuntimeBase::SetObserverFunc(TEventObserver observerFunc) { TGuard<TMutex> guard(Mutex); - auto result = ObserverFunc; - ObserverFunc = observerFunc; - return result; + auto result = ObserverFunc; + ObserverFunc = observerFunc; + return result; } TTestActorRuntimeBase::TScheduledEventsSelector TTestActorRuntimeBase::SetScheduledEventsSelectorFunc(TScheduledEventsSelector scheduledEventsSelectorFunc) { TGuard<TMutex> guard(Mutex); - auto result = ScheduledEventsSelectorFunc; - ScheduledEventsSelectorFunc = scheduledEventsSelectorFunc; - return result; + auto result = ScheduledEventsSelectorFunc; + ScheduledEventsSelectorFunc = scheduledEventsSelectorFunc; + return result; } TTestActorRuntimeBase::TEventFilter TTestActorRuntimeBase::SetEventFilter(TEventFilter filterFunc) { TGuard<TMutex> guard(Mutex); - auto result = EventFilterFunc; - EventFilterFunc = filterFunc; - return result; + auto result = EventFilterFunc; + EventFilterFunc = filterFunc; + return result; } TTestActorRuntimeBase::TScheduledEventFilter TTestActorRuntimeBase::SetScheduledEventFilter(TScheduledEventFilter filterFunc) { TGuard<TMutex> guard(Mutex); - auto result = ScheduledEventFilterFunc; - ScheduledEventFilterFunc = filterFunc; - return result; + auto result = ScheduledEventFilterFunc; + ScheduledEventFilterFunc = filterFunc; + return result; } TTestActorRuntimeBase::TRegistrationObserver TTestActorRuntimeBase::SetRegistrationObserverFunc(TRegistrationObserver observerFunc) { TGuard<TMutex> guard(Mutex); - auto result = RegistrationObserver; - RegistrationObserver = observerFunc; - return result; + auto result = RegistrationObserver; + RegistrationObserver = observerFunc; + return result; } bool TTestActorRuntimeBase::IsVerbose() { @@ -1641,7 +1641,7 @@ namespace NActors { } const auto& interconnectCounters = GetCountersForComponent(node->DynamicCounters, "interconnect"); - + setup->LocalServices = node->LocalServices; setup->Interconnect.ProxyActors.resize(FirstNodeId + NodeCount); const TActorId nameserviceId = GetNameserviceActorId(); diff --git a/library/cpp/actors/testlib/test_runtime.h b/library/cpp/actors/testlib/test_runtime.h index 356c073868..26e3b45c98 100644 --- a/library/cpp/actors/testlib/test_runtime.h +++ b/library/cpp/actors/testlib/test_runtime.h @@ -30,8 +30,8 @@ #include <util/system/valgrind.h> #include <utility> -#include <functional> - +#include <functional> + const TDuration DEFAULT_DISPATCH_TIMEOUT = NSan::PlainOrUnderSanitizer( NValgrind::PlainOrUnderValgrind(TDuration::Seconds(60), TDuration::Seconds(120)), TDuration::Seconds(120) @@ -355,7 +355,7 @@ namespace NActors { template <typename TEvent> TEvent* GrabEdgeEvent(TAutoPtr<IEventHandle>& handle, TDuration simTimeout = TDuration::Max()) { - std::function<bool(const TEvent&)> truth = [](const TEvent&) { return true; }; + std::function<bool(const TEvent&)> truth = [](const TEvent&) { return true; }; return GrabEdgeEventIf(handle, truth, simTimeout); } @@ -644,7 +644,7 @@ namespace NActors { } template <typename TEvent> - TEvent* FindEvent(TEventsList& events, const std::function<bool(const TEvent&)>& predicate) { + TEvent* FindEvent(TEventsList& events, const std::function<bool(const TEvent&)>& predicate) { for (auto& event : events) { if (event && event->GetTypeRewrite() == TEvent::EventType && predicate(*static_cast<TEvent*>(event->GetBase()))) { return static_cast<TEvent*>(event->GetBase()); @@ -669,7 +669,7 @@ namespace NActors { template <typename TEvent> TEvent* GrabEvent(TEventsList& events, TAutoPtr<IEventHandle>& ev, - const std::function<bool(const typename TEvent::TPtr&)>& predicate) { + const std::function<bool(const typename TEvent::TPtr&)>& predicate) { ev.Destroy(); for (auto& event : events) { if (event && event->GetTypeRewrite() == TEvent::EventType) { |