aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorserg-belyakov <serg-belyakov@yandex-team.com>2023-01-26 10:45:50 +0300
committerserg-belyakov <serg-belyakov@yandex-team.com>2023-01-26 10:45:50 +0300
commitaa2d3064f9f20bb26e88c7bce3845c5e91d735aa (patch)
treed4ee60f141bd4d5c53866fb215fed9a86e33cab0 /library/cpp
parentd67291f6f90ba2cce679652aef3a02dd31c696fa (diff)
downloadydb-aa2d3064f9f20bb26e88c7bce3845c5e91d735aa.tar.gz
Add UT for IC version control,
initial
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/actors/testlib/test_runtime.cpp4
-rw-r--r--library/cpp/actors/testlib/test_runtime.h5
2 files changed, 9 insertions, 0 deletions
diff --git a/library/cpp/actors/testlib/test_runtime.cpp b/library/cpp/actors/testlib/test_runtime.cpp
index 9a4a1b7a2f..ad124bf258 100644
--- a/library/cpp/actors/testlib/test_runtime.cpp
+++ b/library/cpp/actors/testlib/test_runtime.cpp
@@ -1705,6 +1705,10 @@ namespace NActors {
common->ClusterUUID = ClusterUUID;
common->AcceptUUID = {ClusterUUID};
+ if (ICCommonSetupper) {
+ ICCommonSetupper(nodeIndex, common);
+ }
+
for (ui32 proxyNodeIndex = 0; proxyNodeIndex < NodeCount; ++proxyNodeIndex) {
if (proxyNodeIndex == nodeIndex)
continue;
diff --git a/library/cpp/actors/testlib/test_runtime.h b/library/cpp/actors/testlib/test_runtime.h
index 163f6bdfd9..343b417b35 100644
--- a/library/cpp/actors/testlib/test_runtime.h
+++ b/library/cpp/actors/testlib/test_runtime.h
@@ -476,6 +476,10 @@ namespace NActors {
UseRealInterconnect = true;
}
+ void SetICCommonSetupper(std::function<void(ui32, TIntrusivePtr<TInterconnectProxyCommon>)>&& icCommonSetupper) {
+ ICCommonSetupper = std::move(icCommonSetupper);
+ }
+
protected:
struct TNodeDataBase;
TNodeDataBase* GetRawNode(ui32 node) const {
@@ -522,6 +526,7 @@ namespace NActors {
const ui32 NodeCount;
const ui32 DataCenterCount;
const bool UseRealThreads;
+ std::function<void(ui32, TIntrusivePtr<TInterconnectProxyCommon>)> ICCommonSetupper;
ui64 LocalId;
TMutex Mutex;