diff options
| author | Alexander Gololobov <[email protected]> | 2022-02-10 16:47:38 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:47:38 +0300 | 
| commit | fccc62e9bfdce9be2fe7e0f23479da3a5512211a (patch) | |
| tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /library/cpp/actors/testlib | |
| parent | 39608cdb86363c75ce55b2b9a69841c3b71f22cf (diff) | |
Restoring authorship annotation for Alexander Gololobov <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/actors/testlib')
| -rw-r--r-- | library/cpp/actors/testlib/test_runtime.cpp | 34 | ||||
| -rw-r--r-- | library/cpp/actors/testlib/test_runtime.h | 8 | 
2 files changed, 21 insertions, 21 deletions
diff --git a/library/cpp/actors/testlib/test_runtime.cpp b/library/cpp/actors/testlib/test_runtime.cpp index fd61e4c7201..6fa25b99656 100644 --- a/library/cpp/actors/testlib/test_runtime.cpp +++ b/library/cpp/actors/testlib/test_runtime.cpp @@ -19,7 +19,7 @@  #include <util/string/printf.h>  #include <typeinfo> -bool VERBOSE = false;  +bool VERBOSE = false;  const bool PRINT_EVENT_BODY = false;  namespace { @@ -86,8 +86,8 @@ namespace NActors {      public:          static constexpr EActivityType ActorActivityType() {              return TEST_ACTOR_RUNTIME; -        }  -  +        } +          TEdgeActor(TTestActorRuntimeBase* runtime)              : TActor(&TEdgeActor::StateFunc)              , Runtime(runtime) @@ -722,9 +722,9 @@ namespace NActors {      }      void TTestActorRuntimeBase::SetVerbose(bool verbose) { -        VERBOSE = verbose;  -    }  -  +        VERBOSE = verbose; +    } +      void TTestActorRuntimeBase::AddLocalService(const TActorId& actorId, const TActorSetupCmd& cmd, ui32 nodeIndex) {          Y_VERIFY(!IsInitialized);          Y_VERIFY(nodeIndex < NodeCount); @@ -1038,10 +1038,10 @@ namespace NActors {      bool TTestActorRuntimeBase::DispatchEvents(const TDispatchOptions& options, TInstant simDeadline) {          TGuard<TMutex> guard(Mutex); -        return DispatchEventsInternal(options, simDeadline);  -    }  -  -    // Mutex must be locked by caller!  +        return DispatchEventsInternal(options, simDeadline); +    } + +    // Mutex must be locked by caller!      bool TTestActorRuntimeBase::DispatchEventsInternal(const TDispatchOptions& options, TInstant simDeadline) {          TDispatchContext localContext;          localContext.Options = &options; @@ -1253,9 +1253,9 @@ namespace NActors {              if (!localContext.FoundNonEmptyMailboxes.empty())                  return true; -            if (options.CustomFinalCondition && options.CustomFinalCondition())  -                return true;  -  +            if (options.CustomFinalCondition && options.CustomFinalCondition()) +                return true; +              if (options.FinalEvents.empty()) {                  for (auto& mbox : currentMailboxes) {                      if (!mbox.second->IsActive(TInstant::MicroSeconds(CurrentTimestamp))) @@ -1755,8 +1755,8 @@ namespace NActors {          public:              static constexpr EActivityType ActorActivityType() {                  return TEST_ACTOR_RUNTIME; -            }  -  +            } +              TReplyActor(TStrandingActorDecorator* owner)                  : TActor(&TReplyActor::StateFunc)                  , Owner(owner) @@ -1771,8 +1771,8 @@ namespace NActors {          static constexpr EActivityType ActorActivityType() {              return TEST_ACTOR_RUNTIME; -        }  -  +        } +          TStrandingActorDecorator(const TActorId& delegatee, bool isSync, const TVector<TActorId>& additionalActors,              TSimpleSharedPtr<TStrandingActorDecoratorContext> context, TTestActorRuntimeBase* runtime,              TReplyCheckerCreator createReplyChecker) diff --git a/library/cpp/actors/testlib/test_runtime.h b/library/cpp/actors/testlib/test_runtime.h index 90de87b5ac6..26e3b45c984 100644 --- a/library/cpp/actors/testlib/test_runtime.h +++ b/library/cpp/actors/testlib/test_runtime.h @@ -93,7 +93,7 @@ namespace NActors {          TVector<TFinalEventCondition> FinalEvents;          TVector<TEventMailboxId> NonEmptyMailboxes;          TVector<TEventMailboxId> OnlyMailboxes; -        std::function<bool()> CustomFinalCondition;  +        std::function<bool()> CustomFinalCondition;          bool Quiet = false;      }; @@ -219,8 +219,8 @@ namespace NActors {          TEventFilter SetEventFilter(TEventFilter filterFunc);          TScheduledEventFilter SetScheduledEventFilter(TScheduledEventFilter filterFunc);          TRegistrationObserver SetRegistrationObserverFunc(TRegistrationObserver observerFunc); -        static bool IsVerbose();  -        static void SetVerbose(bool verbose);  +        static bool IsVerbose(); +        static void SetVerbose(bool verbose);          TDuration SetDispatchTimeout(TDuration timeout);          void SetDispatchedEventsLimit(ui64 limit) {              DispatchedEventsLimit = limit; @@ -499,7 +499,7 @@ namespace NActors {          void ClearMailbox(ui32 nodeId, ui32 hint);          void HandleNonEmptyMailboxesForEachContext(TEventMailboxId mboxId);          void UpdateFinalEventsStatsForEachContext(IEventHandle& ev); -        bool DispatchEventsInternal(const TDispatchOptions& options, TInstant simDeadline);  +        bool DispatchEventsInternal(const TDispatchOptions& options, TInstant simDeadline);      private:          ui64 ScheduledCount;  | 
