aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/testlib
diff options
context:
space:
mode:
authorspuchin <spuchin@yandex-team.ru>2022-02-10 16:48:16 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:16 +0300
commitaab7e440a1750bc0841b355dcc4f388f31e5f5e3 (patch)
treec4ea3bd0ac108e34c329b483ba6ce11e25dfd005 /library/cpp/actors/testlib
parent47dc960d070b29aa93972d1d49088393af89383f (diff)
downloadydb-aab7e440a1750bc0841b355dcc4f388f31e5f5e3.tar.gz
Restoring authorship annotation for <spuchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/actors/testlib')
-rw-r--r--library/cpp/actors/testlib/test_runtime.cpp38
-rw-r--r--library/cpp/actors/testlib/test_runtime.h8
2 files changed, 23 insertions, 23 deletions
diff --git a/library/cpp/actors/testlib/test_runtime.cpp b/library/cpp/actors/testlib/test_runtime.cpp
index 6fa25b9965..73ba61ed97 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)
{
}
diff --git a/library/cpp/actors/testlib/test_runtime.h b/library/cpp/actors/testlib/test_runtime.h
index 26e3b45c98..e3facb3cd8 100644
--- a/library/cpp/actors/testlib/test_runtime.h
+++ b/library/cpp/actors/testlib/test_runtime.h
@@ -226,7 +226,7 @@ namespace NActors {
DispatchedEventsLimit = limit;
}
TDuration SetReschedulingDelay(TDuration delay);
- void SetLogBackend(const TAutoPtr<TLogBackend> logBackend);
+ void SetLogBackend(const TAutoPtr<TLogBackend> logBackend);
void SetLogPriority(NActors::NLog::EComponent component, NActors::NLog::EPriority priority);
TIntrusivePtr<ITimeProvider> GetTimeProvider();
TInstant GetCurrentTime() const;
@@ -466,7 +466,7 @@ namespace NActors {
const TVector<ui64>& GetTxAllocatorTabletIds() const { return TxAllocatorTabletIds; }
void SetTxAllocatorTabletIds(const TVector<ui64>& ids) { TxAllocatorTabletIds = ids; }
-
+
void SetUseRealInterconnect() {
UseRealInterconnect = true;
}
@@ -529,7 +529,7 @@ namespace NActors {
TActorId CurrentRecipient;
ui64 DispatcherRandomSeed;
TIntrusivePtr<IRandomProvider> DispatcherRandomProvider;
- TAutoPtr<TLogBackend> LogBackend;
+ TAutoPtr<TLogBackend> LogBackend;
bool NeedMonitoring;
TIntrusivePtr<IRandomProvider> RandomProvider;
@@ -626,7 +626,7 @@ namespace NActors {
TSet<TActorId> ScheduleWhiteList;
THashMap<TActorId, TActorId> ScheduleWhiteListParent;
THashMap<TActorId, TString> ActorNames;
- TDispatchContext* CurrentDispatchContext;
+ TDispatchContext* CurrentDispatchContext;
TVector<ui64> TxAllocatorTabletIds;
static ui32 NextNodeId;