aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortesseract <tesseract@yandex-team.com>2023-05-18 11:16:46 +0300
committertesseract <tesseract@yandex-team.com>2023-05-18 11:16:46 +0300
commit5296eadaf571105095ce110942815e0194bd4bec (patch)
tree611577b46c29fdacb5dbfb7510b136bc6bd9d101
parent9c0cb68742a37b0952fd4ed62a081ce5a9963eb5 (diff)
downloadydb-5296eadaf571105095ce110942815e0194bd4bec.tar.gz
Speed up TestLowWatermark
Тест медленно выполнялся т.к. было 170 его повторений - перезагрузка после каждого сообщения. Перечисляю типы сообщений, после которых не требуется перезагрузка, что уменьшает кол-во прогонов.
-rw-r--r--ydb/core/persqueue/ut/common/pq_ut_common.h1
-rw-r--r--ydb/core/persqueue/ut/pq_ut.cpp15
2 files changed, 15 insertions, 1 deletions
diff --git a/ydb/core/persqueue/ut/common/pq_ut_common.h b/ydb/core/persqueue/ut/common/pq_ut_common.h
index 2360e0594e1..2d187d87f80 100644
--- a/ydb/core/persqueue/ut/common/pq_ut_common.h
+++ b/ydb/core/persqueue/ut/common/pq_ut_common.h
@@ -42,6 +42,7 @@ public:
bool operator()(TTestActorRuntimeBase& runtime, TAutoPtr<IEventHandle>& event) {
Y_UNUSED(runtime);
Y_UNUSED(event);
+
return false;
}
};
diff --git a/ydb/core/persqueue/ut/pq_ut.cpp b/ydb/core/persqueue/ut/pq_ut.cpp
index ec85e940c66..1149f285d34 100644
--- a/ydb/core/persqueue/ut/pq_ut.cpp
+++ b/ydb/core/persqueue/ut/pq_ut.cpp
@@ -1288,7 +1288,20 @@ Y_UNIT_TEST(TestWriteSplit) {
Y_UNIT_TEST(TestLowWatermark) {
TTestContext tc;
RunTestWithReboots(tc.TabletIds, [&]() {
- return tc.InitialEventsFilter.Prepare();
+ return [](TTestActorRuntimeBase&, TAutoPtr<IEventHandle>& event) -> bool {
+ const auto name = event->GetTypeName();
+ return name == "NKikimr::TEvTabletPipe::TEvClientConnected" ||
+ name == "NKikimr::TEvTabletPipe::TEvClientDestroyed" ||
+ name == "NKikimr::TEvTabletPipe::TEvServerConnected" ||
+ name == "NKikimr::NPDisk::TEvLog" ||
+ name == "NKikimr::NPDisk::TEvLogResult" ||
+ name == "NKikimr::TEvKeyValue::TEvCollect" ||
+ name == "NKikimr::TEvKeyValue::TEvCompleteGC" ||
+ name == "NKikimr::TEvKeyValue::TEvIntermediate" ||
+ name == "NKikimr::TEvKeyValue::TEvPartialCompleteGC" ||
+ name == "NKikimr::TEvPQ::TEvPartitionLabeledCounters" ||
+ name == "NKikimr::TEvPQ::TEvProxyResponse";
+ };
}, [&](const TString& dispatchName, std::function<void(TTestActorRuntime&)> setup, bool& activeZone) {
TFinalizer finalizer(tc);
tc.Prepare(dispatchName, setup, activeZone);