diff options
author | eivanov89 <eivanov89@ydb.tech> | 2022-09-15 18:08:47 +0300 |
---|---|---|
committer | eivanov89 <eivanov89@ydb.tech> | 2022-09-15 18:08:47 +0300 |
commit | 3982fa8cd76790fb21c9ecfb5775cdcaa2368005 (patch) | |
tree | 1c7d93cf90e0c0794d2cb6c5a8321293cc82371c | |
parent | f59b0432fa711edd8731e587548b58d728aeaf39 (diff) | |
download | ydb-3982fa8cd76790fb21c9ecfb5775cdcaa2368005.tar.gz |
fix stack-use-after-scope in test
-rw-r--r-- | ydb/core/tx/datashard/datashard_ut_read_iterator.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ydb/core/tx/datashard/datashard_ut_read_iterator.cpp b/ydb/core/tx/datashard/datashard_ut_read_iterator.cpp index e7e66842bb2..e95b4accb30 100644 --- a/ydb/core/tx/datashard/datashard_ut_read_iterator.cpp +++ b/ydb/core/tx/datashard/datashard_ut_read_iterator.cpp @@ -646,6 +646,9 @@ struct TTestHelper { waitFor([&]{ return result.ReadSets.size() == 1; }, "intercepted RS"); + // restore original observer (note we used lambda function and stack variables) + Server->GetRuntime()->SetObserverFunc(prevObserverFunc); + return result; } |