kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [2/2] kudu git commit: rpc-test: fix flakiness of TestCallLongerThanKeepalive
Date Mon, 05 Dec 2016 07:26:25 GMT
rpc-test: fix flakiness of TestCallLongerThanKeepalive

The 50ms keepalive was apparently short enough that occasionally the
server connection would drop before even receiving the initial call on
the connection. This would cause the test to fail with a spurious
"connection reset" type error.

I looped the following to test:

/build-support/dist_test.py --disable-sharding \
   loop -n 1000 build/latest/bin/rpc-test \
   --gtest_filter=OptionalSSL/TestRpc.TestCallLongerThanKeepalive/1 \
   --stress_cpu_threads=8

Without the patch[1] there were 31/1000 failures, all due to this issue.
With the patch[2] there were no failures.

[1] http://dist-test.cloudera.org//job?job_id=todd.1480911578.21798
[2] http://dist-test.cloudera.org//job?job_id=todd.1480911736.2857

Change-Id: I8d8d981af6dae90d0c656745d9260ffa920c9039
Reviewed-on: http://gerrit.cloudera.org:8080/5355
Reviewed-by: Adar Dembo <adar@cloudera.com>
Tested-by: Kudu Jenkins


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

Branch: refs/heads/master
Commit: 0ac14a564157de2968dbd97a5cc560e427f2d8d6
Parents: a6cf13f
Author: Todd Lipcon <todd@apache.org>
Authored: Mon Dec 5 12:13:26 2016 +0800
Committer: Todd Lipcon <todd@apache.org>
Committed: Mon Dec 5 07:04:39 2016 +0000

----------------------------------------------------------------------
 src/kudu/rpc/rpc-test.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/0ac14a56/src/kudu/rpc/rpc-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc-test.cc b/src/kudu/rpc/rpc-test.cc
index ea11781..847d2a2 100644
--- a/src/kudu/rpc/rpc-test.cc
+++ b/src/kudu/rpc/rpc-test.cc
@@ -260,8 +260,8 @@ TEST_P(TestRpc, TestConnectionKeepalive) {
 // succeeds -- i.e that we don't consider a connection to be "idle" on the
 // server if there is a call outstanding on it.
 TEST_P(TestRpc, TestCallLongerThanKeepalive) {
-  // set very short keepalive
-  keepalive_time_ms_ = 50;
+  // Set a short keepalive.
+  keepalive_time_ms_ = 1000;
 
   // Set up server.
   Sockaddr server_addr;
@@ -275,7 +275,7 @@ TEST_P(TestRpc, TestCallLongerThanKeepalive) {
   // Make a call which sleeps longer than the keepalive.
   RpcController controller;
   SleepRequestPB req;
-  req.set_sleep_micros(100 * 1000);
+  req.set_sleep_micros(3 * 1000 * 1000); // 3 seconds.
   req.set_deferred(true);
   SleepResponsePB resp;
   ASSERT_OK(p.SyncRequest(GenericCalculatorService::kSleepMethodName,


Mime
View raw message