Skip to content

Commit 347b0c9

Browse files
azevaykinsnaury
authored andcommitted
Add const to the condition function (ydb-platform#8644)
1 parent 39bd6ac commit 347b0c9

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

ydb/core/testlib/actors/block_events.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace NActors {
1414
template<class TEvType>
1515
class TBlockEvents : public std::deque<typename TEvType::TPtr> {
1616
public:
17-
TBlockEvents(TTestActorRuntime& runtime, std::function<bool(typename TEvType::TPtr&)> condition = {})
17+
TBlockEvents(TTestActorRuntime& runtime, std::function<bool(const typename TEvType::TPtr&)> condition = {})
1818
: Runtime(runtime)
1919
, Condition(std::move(condition))
2020
, Holder(Runtime.AddObserver<TEvType>(

ydb/core/testlib/actors/test_runtime_ut.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ Y_UNIT_TEST_SUITE(TActorTest) {
793793
auto source = runtime.Register(new TSourceActor(target), /* nodeIdx */ 1);
794794
runtime.EnableScheduleForActor(source);
795795

796-
TBlockEvents<TEvTrigger> block(runtime, [&](TEvTrigger::TPtr& ev){ return ev->GetRecipientRewrite() == target; });
796+
TBlockEvents<TEvTrigger> block(runtime, [&](const TEvTrigger::TPtr& ev){ return ev->GetRecipientRewrite() == target; });
797797
runtime.WaitFor("blocked 3 events", [&]{ return block.size() >= 3; });
798798
UNIT_ASSERT_VALUES_EQUAL(block.size(), 3u);
799799
UNIT_ASSERT_VALUES_EQUAL(values.size(), 0u);

ydb/core/tx/datashard/datashard_ut_build_index.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Y_UNIT_TEST_SUITE(TTxDataShardBuildIndexScan) {
168168

169169
CreateShardedTableForIndex(server, sender, "/Root", "table-2", 1, false);
170170

171-
TBlockEvents<TEvDataShard::TEvCompactBorrowed> block(runtime, [&](TEvDataShard::TEvCompactBorrowed::TPtr& event) {
171+
TBlockEvents<TEvDataShard::TEvCompactBorrowed> block(runtime, [&](const TEvDataShard::TEvCompactBorrowed::TPtr& event) {
172172
return runtime.FindActorName(event->Sender) == "FLAT_SCHEMESHARD_ACTOR";
173173
});
174174

ydb/core/tx/datashard/datashard_ut_stats.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ Y_UNIT_TEST_SUITE(DataShardStats) {
443443

444444
UpsertRows(server, sender);
445445

446-
TBlockEvents<NSharedCache::TEvResult> block(runtime, [&](NSharedCache::TEvResult::TPtr& event) {
446+
TBlockEvents<NSharedCache::TEvResult> block(runtime, [&](const NSharedCache::TEvResult::TPtr& event) {
447447
return runtime.FindActorName(event->GetRecipientRewrite()) == "DATASHARD_STATS_BUILDER";
448448
});
449449

0 commit comments

Comments
 (0)