kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [3/4] incubator-kudu git commit: client-stress-test: fix TSAN build flakiness
Date Tue, 26 Jan 2016 17:14:01 GMT
client-stress-test: fix TSAN build flakiness

On TSAN builds, this has been failing reasonably often on GCE slaves.
It seems like the new slaves just run a bit slower than the old ones,
and therefore we need to make the test a little more lenient in TSAN
builds.

Change-Id: I5e9beec3a8a75cf5a83c8ec3ae6e04396303a662
Reviewed-on: http://gerrit.cloudera.org:8080/1893
Tested-by: Todd Lipcon <todd@apache.org>
Reviewed-by: Jean-Daniel Cryans


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/242e5da4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/242e5da4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/242e5da4

Branch: refs/heads/master
Commit: 242e5da4652b0a8808240278d5a86556d4e59164
Parents: 3df123a
Author: Todd Lipcon <todd@apache.org>
Authored: Mon Jan 25 11:58:27 2016 -0800
Committer: Jean-Daniel Cryans <jdcryans@gerrit.cloudera.org>
Committed: Tue Jan 26 17:05:06 2016 +0000

----------------------------------------------------------------------
 src/kudu/integration-tests/client-stress-test.cc | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/242e5da4/src/kudu/integration-tests/client-stress-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/client-stress-test.cc b/src/kudu/integration-tests/client-stress-test.cc
index 4a6e80e..9be5f71 100644
--- a/src/kudu/integration-tests/client-stress-test.cc
+++ b/src/kudu/integration-tests/client-stress-test.cc
@@ -222,7 +222,14 @@ 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
   const int64_t kMinRejections = 100;
+#endif
+
   const MonoDelta kMaxWaitTime = MonoDelta::FromSeconds(60);
 
   TestWorkload work(cluster_.get());
@@ -265,7 +272,8 @@ TEST_F(ClientStressTest_LowMemory, TestMemoryThrottling) {
     if (total_num_rejections >= kMinRejections) {
       break;
     } else if (deadline.ComesBefore(MonoTime::Now(MonoTime::FINE))) {
-      FAIL() << "Ran for " << kMaxWaitTime.ToString() << ", deadline expired";
+      FAIL() << "Ran for " << kMaxWaitTime.ToString() << ", deadline expired
and only saw "
+             << total_num_rejections << " memory rejections";
     }
     SleepFor(MonoDelta::FromMilliseconds(200));
   }


Mime
View raw message