This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new a760429 [tests] don't build client-stress-test with ASAN/TSAN
a760429 is described below
commit a760429a6479fdd71dd8e25bc35c39e46a9dd8f4
Author: Alexey Serbin <[email protected]>
AuthorDate: Mon Nov 15 09:04:42 2021 -0800
[tests] don't build client-stress-test with ASAN/TSAN
Test scenarios in client-stress-test are CPU and memory intensive,
and some of those are intended for benchmarking to track performance
regressions in the C++ client's metacache. With that, there isn't much
sense to build and run them for ASAN/TSAN builds, so why to compile them
under ASAN/TSAN configurations at all? As for the test coverage to catch
possible concurrency and undefined behavior issues, there is overlap
between the tests in client-stress-test and tests in client-test,
master-stress-test, and many others.
The motivation for this change is to address the feedback for one
of prior changelists [1].
[1]
https://gerrit.cloudera.org/#/c/18024/3/src/kudu/integration-tests/client-stress-test.cc@337
Change-Id: Ic044d051d6011d1cca95fc92d1daf400e3e3d116
Reviewed-on: http://gerrit.cloudera.org:8080/18027
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Attila Bukor <[email protected]>
---
src/kudu/integration-tests/CMakeLists.txt | 11 +++++++++--
src/kudu/integration-tests/client-stress-test.cc | 16 +++-------------
2 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/src/kudu/integration-tests/CMakeLists.txt
b/src/kudu/integration-tests/CMakeLists.txt
index 9e2f8ad..0738ea6 100644
--- a/src/kudu/integration-tests/CMakeLists.txt
+++ b/src/kudu/integration-tests/CMakeLists.txt
@@ -67,8 +67,6 @@ ADD_KUDU_TEST(catalog_manager_tsk-itest PROCESSORS 2)
ADD_KUDU_TEST(varchar-itest)
ADD_KUDU_TEST(client_failover-itest)
ADD_KUDU_TEST(client-negotiation-failover-itest)
-ADD_KUDU_TEST(client-stress-test
- RUN_SERIAL true)
ADD_KUDU_TEST(consensus_peer_health_status-itest)
ADD_KUDU_TEST(consistency-itest PROCESSORS 5)
ADD_KUDU_TEST(create-table-itest PROCESSORS 3)
@@ -150,6 +148,15 @@ ADD_KUDU_TEST(webserver-stress-itest RUN_SERIAL true)
ADD_KUDU_TEST(write_limit-itest)
ADD_KUDU_TEST(write_throttling-itest)
+# The scenarios in client-stress-test are used for benchmarking and stress
+# testing of the client meta-cache. These are CPU and memory intensive, and
+# running them under ASAN/TSAN takes a long time. Other tests (such as
+# client-test, etc.) already provide good coverage for the related components
+# to run under ASAN/TSAN.
+if(NOT "${KUDU_USE_ASAN}" AND NOT "${KUDU_USE_TSAN}")
+ ADD_KUDU_TEST(client-stress-test RUN_SERIAL true)
+endif()
+
if (NOT APPLE)
ADD_KUDU_TEST(minidump_generation-itest)
endif()
diff --git a/src/kudu/integration-tests/client-stress-test.cc
b/src/kudu/integration-tests/client-stress-test.cc
index 8ccab48..a626077 100644
--- a/src/kudu/integration-tests/client-stress-test.cc
+++ b/src/kudu/integration-tests/client-stress-test.cc
@@ -40,7 +40,6 @@
#include "kudu/client/write_op.h"
#include "kudu/common/partial_row.h"
#include "kudu/common/partition.h"
-#include "kudu/gutil/port.h"
#include "kudu/gutil/ref_counted.h"
#include "kudu/gutil/strings/join.h"
#include "kudu/gutil/strings/substitute.h"
@@ -238,9 +237,9 @@ TEST_F(ClientStressTest_MultiMaster,
TestLeaderResolutionTimeout) {
// Override the base test to start a cluster with a low memory limit.
-class ClientStressTest_LowMemory : public ClientStressTest {
+class ClientStressLowMemoryTest : public ClientStressTest {
protected:
- virtual ExternalMiniClusterOptions default_opts() const OVERRIDE {
+ ExternalMiniClusterOptions default_opts() const override {
// There's nothing scientific about this number; it must be low enough to
// trigger memory pressure request rejection yet high enough for the
// servers to make forward progress.
@@ -259,15 +258,8 @@ class ClientStressTest_LowMemory : public ClientStressTest
{
// Stress test where, due to absurdly low memory limits, many client requests
// are rejected, forcing the client to retry repeatedly.
-TEST_F(ClientStressTest_LowMemory, TestMemoryThrottling) {
-#ifdef THREAD_SANITIZER
- // TSAN tests run much slower, so we don't want to wait for as many
- // rejections before declaring the test to be passed.
- const int64_t kMinRejections = 20;
-#else
+TEST_F(ClientStressLowMemoryTest, TestMemoryThrottling) {
const int64_t kMinRejections = 100;
-#endif
-
const MonoDelta kMaxWaitTime = MonoDelta::FromSeconds(60);
TestWorkload work(cluster_.get());
@@ -334,7 +326,6 @@ TEST_F(ClientStressTest, TestUniqueClientIds) {
}
}
-#if !defined(THREAD_SANITIZER) && !defined(ADDRESS_SANITIZER)
// Test for stress scenarios exercising meta-cache lookup path. The scenarios
// not to be run under sanitizer builds since they are CPU intensive.
class MetaCacheLookupStressTest : public ClientStressTest {
@@ -462,6 +453,5 @@ TEST_F(MetaCacheLookupStressTest, Perf) {
LOG(INFO) << Substitute("Total time spent: $0 ms", wall_spent_ms);
LOG(INFO) << Substitute("Time per row: $0 ms", wall_spent_ms / kNumRows);
}
-#endif // #if !defined(THREAD_SANITIZER) && !defined(ADDRESS_SANITIZER)
} // namespace kudu