aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib/src/tests')
-rw-r--r--searchlib/src/tests/query/streaming_query_large_test.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/searchlib/src/tests/query/streaming_query_large_test.cpp b/searchlib/src/tests/query/streaming_query_large_test.cpp
index 55c844723d9..b39dad43a7b 100644
--- a/searchlib/src/tests/query/streaming_query_large_test.cpp
+++ b/searchlib/src/tests/query/streaming_query_large_test.cpp
@@ -4,6 +4,7 @@
#include <vespa/searchlib/query/tree/simplequery.h>
#include <vespa/searchlib/query/tree/stackdumpcreator.h>
#include <vespa/vespalib/testkit/test_kit.h>
+#include <vespa/vespalib/util/sanitizers.h>
#include <vespa/vespalib/util/size_literals.h>
#include <sys/resource.h>
@@ -11,22 +12,6 @@ using namespace search;
using namespace search::query;
using namespace search::streaming;
-#ifndef __SANITIZE_ADDRESS__
-#if defined(__has_feature)
-#if __has_feature(address_sanitizer)
-#define __SANITIZE_ADDRESS__
-#endif
-#endif
-#endif
-
-#ifndef __SANITIZE_THREAD__
-#if defined(__has_feature)
-#if __has_feature(thread_sanitizer)
-#define __SANITIZE_THREAD__
-#endif
-#endif
-#endif
-
namespace {
[[maybe_unused]] void setMaxStackSize(rlim_t maxStackSize)
@@ -44,10 +29,10 @@ namespace {
// a stack overflow if the stack usage increases.
TEST("testveryLongQueryResultingInBug6850778") {
uint32_t NUMITEMS=20000;
-#ifdef __SANITIZE_ADDRESS__
+#ifdef VESPA_USE_ADDRESS_SANITIZER
setMaxStackSize(12_Mi);
#else
-#ifdef __SANITIZE_THREAD__
+#ifdef VESPA_USE_THREAD_SANITIZER
NUMITEMS = 10000;
#else
setMaxStackSize(4_Mi);