Hello Dan Burkert,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/5159
to review the following change.
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
---
M src/kudu/rpc/rpc-test-base.h
M src/kudu/rpc/rpc-test.cc
2 files changed, 6 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/59/5159/1
--
To view, visit http://gerrit.cloudera.org:8080/5159
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0900ad45e07c936186e3477dd0b82cb226e20361
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>