diff options
| author | azevaykin <[email protected]> | 2023-12-07 12:51:22 +0300 |
|---|---|---|
| committer | azevaykin <[email protected]> | 2023-12-07 13:37:05 +0300 |
| commit | b02752271b118467bfccb968d4ef887635c3d357 (patch) | |
| tree | cdac9c941e8192314a86f08ee20ffb4f8c2e8afe | |
| parent | 486a2e0697f435e92b4e37feca8d99765df34fa1 (diff) | |
Remove the observer before return from function
| -rw-r--r-- | ydb/core/tx/datashard/ut_common/datashard_ut_common.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ydb/core/tx/datashard/ut_common/datashard_ut_common.cpp b/ydb/core/tx/datashard/ut_common/datashard_ut_common.cpp index ab18bd8673f..00e0125d9c4 100644 --- a/ydb/core/tx/datashard/ut_common/datashard_ut_common.cpp +++ b/ydb/core/tx/datashard/ut_common/datashard_ut_common.cpp @@ -816,8 +816,10 @@ ui64 TFakeMiniKQLProxy::Plan(ui64 stepId, const TMap<ui64, TFakeProxyTx::TPtr>& return TTestActorRuntime::EEventAction::PROCESS; }; - if (immEvents || DelayedReadSets || DelayedData) { - Tester.Runtime.SetObserverFunc(observer); + NActors::TTestActorRuntime::TEventObserver prevObserver; + bool catchEvents = immEvents || DelayedReadSets || DelayedData; + if (catchEvents) { + prevObserver = Tester.Runtime.SetObserverFunc(observer); } while (acks || plans || (results && waitForResult) || streams) { @@ -992,6 +994,10 @@ ui64 TFakeMiniKQLProxy::Plan(ui64 stepId, const TMap<ui64, TFakeProxyTx::TPtr>& } } + if (catchEvents) { + Tester.Runtime.SetObserverFunc(prevObserver); + } + return stepId; } |
