aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorazevaykin <azevaykin@yandex-team.com>2023-10-25 13:53:48 +0300
committerazevaykin <azevaykin@yandex-team.com>2023-10-25 14:16:54 +0300
commit70c7afa4682ef8e82f965200054430838c9e9050 (patch)
tree035bb03fea3acf54a06681e1e77c6db6173323fd
parentd04e402b33f2eb5a5badb27b5057b482b1b244d3 (diff)
downloadydb-70c7afa4682ef8e82f965200054430838c9e9050.tar.gz
Code style
-rw-r--r--library/cpp/actors/testlib/test_runtime.cpp2
-rw-r--r--library/cpp/actors/testlib/test_runtime.h6
-rw-r--r--ydb/core/tx/datashard/datashard_ut_snapshot.cpp12
3 files changed, 12 insertions, 8 deletions
diff --git a/library/cpp/actors/testlib/test_runtime.cpp b/library/cpp/actors/testlib/test_runtime.cpp
index 323e0033ea..18e58c21de 100644
--- a/library/cpp/actors/testlib/test_runtime.cpp
+++ b/library/cpp/actors/testlib/test_runtime.cpp
@@ -1208,7 +1208,7 @@ namespace NActors {
for (auto observer : ObserverFuncs) {
observer(ev);
- if(!ev) break;
+ if (!ev) break;
}
if(ev && ObserverFunc(ev) != EEventAction::DROP && ev)
diff --git a/library/cpp/actors/testlib/test_runtime.h b/library/cpp/actors/testlib/test_runtime.h
index 24bbf2feff..7e650565cc 100644
--- a/library/cpp/actors/testlib/test_runtime.h
+++ b/library/cpp/actors/testlib/test_runtime.h
@@ -305,14 +305,16 @@ namespace NActors {
{
}
- ~TEventObserverHolder() {
+ ~TEventObserverHolder()
+ {
Remove();
}
void Remove()
{
- if(Iter == List.end())
+ if (Iter == List.end()) {
return;
+ }
List.erase(Iter);
Iter = List.end();
diff --git a/ydb/core/tx/datashard/datashard_ut_snapshot.cpp b/ydb/core/tx/datashard/datashard_ut_snapshot.cpp
index e2f6b790b9..f76c1afe17 100644
--- a/ydb/core/tx/datashard/datashard_ut_snapshot.cpp
+++ b/ydb/core/tx/datashard/datashard_ut_snapshot.cpp
@@ -3693,22 +3693,24 @@ Y_UNIT_TEST_SUITE(DataShardSnapshots) {
std::vector<std::unique_ptr<IEventHandle>> readResults;
auto readObserverHolder = runtime.AddObserver<TEvDataShard::TEvRead>([&](auto& ev) {
- if (blockReads)
+ if (blockReads) {
reads.emplace_back(ev.Release());
- else
+ } else {
ev->Get()->Record.SetMaxRowsInResult(1);
+ }
});
auto readResultObserverHolder = runtime.AddObserver<TEvDataShard::TEvReadResult>([&](auto& ev) {
if (!haveReadResult) {
haveReadResult = true;
haveReadResultSnapshot = ev->Get()->Record.HasSnapshot();
- }
- else if (blockReadResults)
+ } else if (blockReadResults) {
readResults.emplace_back(ev.Release());
+ }
});
auto readAckObserverHolder = runtime.AddObserver<TEvDataShard::TEvReadAck>([&](auto& ev) {
- if (blockReadAcks)
+ if (blockReadAcks) {
readAcks.emplace_back(ev.Release());
+ }
});
TString sessionId = CreateSessionRPC(runtime, "/Root");