Todd Lipcon has submitted this change and it was merged.
Change subject: rpc-test: fix flakiness on keepalive test
......................................................................
rpc-test: fix flakiness on keepalive test
The keepalive test was using a pretty short keepalive and asserting on
the observed timing. In addition, the test was setting the keepalive
scanner and timer to a granularity equal to the keepalive time, which
meant that connections could time out much more quickly than expected,
eg:
- t=1000: timer tick runs, sets reactor's cur_time_ to t=1000ms
- t=1149: connection starts, sets last_activity_time_ = 1000ms
- t=1150: timer tick runs, sets reactor's cur_time to 1050ms
scanner sees that the connection has been "idle" for 50ms
To fix this, the patch sets the timer granularity to 20% of the
keepalive time, to ensure that at most we are 20% off from the intended
time instead of 100% off.
This reduced the keepalive test flakiness from ~10% to 0%. One other
test case still appears to be flaky, but will address that separately.
Change-Id: I0900ad45e07c936186e3477dd0b82cb226e20361
Reviewed-on: http://gerrit.cloudera.org:8080/5159
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <[email protected]>
---
M src/kudu/rpc/rpc-test-base.h
M src/kudu/rpc/rpc-test.cc
2 files changed, 6 insertions(+), 3 deletions(-)
Approvals:
Adar Dembo: Looks good to me, approved
Kudu Jenkins: Verified
--
To view, visit http://gerrit.cloudera.org:8080/5159
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0900ad45e07c936186e3477dd0b82cb226e20361
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <[email protected]>