diff options
author | spuchin <[email protected]> | 2022-02-10 16:48:17 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:48:17 +0300 |
commit | 6238988d0cc5068b8e6f61abe8dac4c6817720ad (patch) | |
tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/actors/testlib/test_runtime.cpp | |
parent | aab7e440a1750bc0841b355dcc4f388f31e5f5e3 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/actors/testlib/test_runtime.cpp')
-rw-r--r-- | library/cpp/actors/testlib/test_runtime.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/library/cpp/actors/testlib/test_runtime.cpp b/library/cpp/actors/testlib/test_runtime.cpp index 73ba61ed976..6fa25b99656 100644 --- a/library/cpp/actors/testlib/test_runtime.cpp +++ b/library/cpp/actors/testlib/test_runtime.cpp @@ -479,7 +479,7 @@ namespace NActors { , EventFilterFunc(&TTestActorRuntimeBase::DefaultFilterFunc) , ScheduledEventFilterFunc(&TTestActorRuntimeBase::NopFilterFunc) , RegistrationObserver(&TTestActorRuntimeBase::DefaultRegistrationObserver) - , CurrentDispatchContext(nullptr) + , CurrentDispatchContext(nullptr) { SetDispatcherRandomSeed(TInstant::Now(), 0); EnableActorCallstack(); @@ -775,19 +775,19 @@ namespace NActors { void TTestActorRuntimeBase::SetLogBackend(const TAutoPtr<TLogBackend> logBackend) { Y_VERIFY(!IsInitialized); - TGuard<TMutex> guard(Mutex); - LogBackend = logBackend; - } - + TGuard<TMutex> guard(Mutex); + LogBackend = logBackend; + } + void TTestActorRuntimeBase::SetLogPriority(NActors::NLog::EComponent component, NActors::NLog::EPriority priority) { TGuard<TMutex> guard(Mutex); for (ui32 nodeIndex = 0; nodeIndex < NodeCount; ++nodeIndex) { TNodeDataBase* node = Nodes[FirstNodeId + nodeIndex].Get(); TString explanation; - auto status = node->LogSettings->SetLevel(priority, component, explanation); - if (status) { - Y_FAIL("SetLogPriority failed: %s", explanation.c_str()); - } + auto status = node->LogSettings->SetLevel(priority, component, explanation); + if (status) { + Y_FAIL("SetLogPriority failed: %s", explanation.c_str()); + } } } @@ -1050,19 +1050,19 @@ namespace NActors { struct TDispatchContextSetter { TDispatchContextSetter(TTestActorRuntimeBase& runtime, TDispatchContext& lastContext) - : Runtime(runtime) + : Runtime(runtime) { - lastContext.PrevContext = Runtime.CurrentDispatchContext; - Runtime.CurrentDispatchContext = &lastContext; + lastContext.PrevContext = Runtime.CurrentDispatchContext; + Runtime.CurrentDispatchContext = &lastContext; } ~TDispatchContextSetter() { - Runtime.CurrentDispatchContext = Runtime.CurrentDispatchContext->PrevContext; + Runtime.CurrentDispatchContext = Runtime.CurrentDispatchContext->PrevContext; } TTestActorRuntimeBase& Runtime; - } DispatchContextSetter(*this, localContext); - + } DispatchContextSetter(*this, localContext); + TInstant dispatchTime = TInstant::MicroSeconds(0); TInstant deadline = dispatchTime + DispatchTimeout; const TDuration scheduledEventsInspectInterval = TDuration::MilliSeconds(10); @@ -1781,7 +1781,7 @@ namespace NActors { , AdditionalActors(additionalActors) , Context(context) , HasReply(false) - , Runtime(runtime) + , Runtime(runtime) , ReplyChecker(createReplyChecker()) { if (IsSync) { @@ -1835,14 +1835,14 @@ namespace NActors { int count = 100; while (!HasReply && count > 0) { try { - Runtime->DispatchEvents(DelegateeOptions); + Runtime->DispatchEvents(DelegateeOptions); } catch (TEmptyEventQueueException&) { count--; Cerr << "No reply" << Endl; } } - Runtime->UpdateCurrentTime(Runtime->GetCurrentTime() + TDuration::MicroSeconds(1000)); + Runtime->UpdateCurrentTime(Runtime->GetCurrentTime() + TDuration::MicroSeconds(1000)); } } } @@ -1877,7 +1877,7 @@ namespace NActors { TStrandingDecoratorFactory(TTestActorRuntimeBase* runtime, TReplyCheckerCreator createReplyChecker) : Context(new TStrandingActorDecoratorContext()) - , Runtime(runtime) + , Runtime(runtime) , CreateReplyChecker(createReplyChecker) { } |