From 98d2c2085aa5c964915329ff370540842bee85d2 Mon Sep 17 00:00:00 2001 From: Maxim Deb Natkh Date: Thu, 14 Nov 2024 15:20:59 +0100 Subject: [PATCH] issue-1146: make ut_cache stress test use less iterations while being executed under tsan/ubsan/asan alike other ut tests (#2499) --- .../libs/storage/tablet/tablet_ut_cache_stress.cpp | 8 +++++++- .../filestore/libs/storage/tablet/ut_cache_stress/ya.make | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cloud/filestore/libs/storage/tablet/tablet_ut_cache_stress.cpp b/cloud/filestore/libs/storage/tablet/tablet_ut_cache_stress.cpp index d60c50415a4..caa2ff4e8a2 100644 --- a/cloud/filestore/libs/storage/tablet/tablet_ut_cache_stress.cpp +++ b/cloud/filestore/libs/storage/tablet/tablet_ut_cache_stress.cpp @@ -67,7 +67,13 @@ class TRequestGenerator TVector RunRandomIndexLoad() { TVector responses; - const size_t numRequests = 5000; + + const auto sanitizerType = GetEnv("SANITIZER_TYPE"); + STORAGE_INFO("Sanitizer: %s", sanitizerType.c_str()); + const THashSet slowSanitizers({"thread", "undefined", "address"}); + const ui32 d = slowSanitizers.contains(sanitizerType) ? 20 : 1; + + const size_t numRequests = 5000 / d; while (responses.size() < numRequests) { auto operation = GetRandomOperation(); diff --git a/cloud/filestore/libs/storage/tablet/ut_cache_stress/ya.make b/cloud/filestore/libs/storage/tablet/ut_cache_stress/ya.make index d839cbcf36d..5f2a8cd1f4e 100644 --- a/cloud/filestore/libs/storage/tablet/ut_cache_stress/ya.make +++ b/cloud/filestore/libs/storage/tablet/ut_cache_stress/ya.make @@ -10,6 +10,8 @@ PEERDIR( cloud/filestore/libs/storage/testlib ) +ENV(SANITIZER_TYPE=${SANITIZER_TYPE}) + YQL_LAST_ABI_VERSION() END()