Repository: kudu Updated Branches: refs/heads/master b2fc399f6 -> 50274c8f8
[linked list test] use timeout for WaitAndVerify in all modes Constrain LinkedListTester::WaitAndVerify by the specified timeout for FINISH_WITH_SNAPSHOT_SCAN mode as well. Otherwise the TestLoadAndVerify scenario of the LinkedListTest test can run indefinitely under some conditions. One of such conditions is the expiration of the client authn token during the test: if that happens, WaitAndVerify() call might end up doing indefinite retries. The proper client behavior on the expiration of the authn token will be addressed in a separate changelist. Change-Id: If129738fbeef5394dfd1bcb160121e1d4131b3cc Reviewed-on: http://gerrit.cloudera.org:8080/6155 Tested-by: Kudu Jenkins Reviewed-by: Adar Dembo <[email protected]> Reviewed-by: Mike Percy <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/b39bfcb4 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/b39bfcb4 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/b39bfcb4 Branch: refs/heads/master Commit: b39bfcb4c919024abe2bd6e92ad7e4d9444c54f6 Parents: b2fc399 Author: Alexey Serbin <[email protected]> Authored: Sat Feb 25 10:26:02 2017 -0800 Committer: Alexey Serbin <[email protected]> Committed: Tue Feb 28 01:57:23 2017 +0000 ---------------------------------------------------------------------- .../integration-tests/linked_list-test-util.h | 29 ++++++++++---------- 1 file changed, 15 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/b39bfcb4/src/kudu/integration-tests/linked_list-test-util.h ---------------------------------------------------------------------- diff --git a/src/kudu/integration-tests/linked_list-test-util.h b/src/kudu/integration-tests/linked_list-test-util.h index 876dc52..8d3d559 100644 --- a/src/kudu/integration-tests/linked_list-test-util.h +++ b/src/kudu/integration-tests/linked_list-test-util.h @@ -765,22 +765,23 @@ Status LinkedListTester::WaitAndVerify(int seconds_to_run, s = VerifyLinkedListAtLatestRemote( expected, last_attempt, boost::bind(&LinkedListTester::ReturnOk, this, _1), &seen); } - - if (!s.ok()) { - LOG(INFO) << "Table not yet ready: " << seen << "/" << expected << " rows" - << " (status: " << s.ToString() << ")"; - if (last_attempt) { - // We'll give it an equal amount of time to re-load the data as it took - // to write it in. Typically it completes much faster than that. - return Status::TimedOut("Timed out waiting for table to be accessible again", - s.ToString()); - } - - // Sleep and retry until timeout. - SleepFor(MonoDelta::FromMilliseconds(20)); - } break; } + + if (!s.ok()) { + KLOG_EVERY_N(INFO, 10) << "Table not yet ready: " << seen << "/" + << expected << " rows (status: " + << s.ToString() << ")"; + if (last_attempt) { + // We'll give it an equal amount of time to re-load the data as it took + // to write it in. Typically it completes much faster than that. + return Status::TimedOut("Timed out waiting for table to be accessible again", + s.ToString()); + } + + // Sleep and retry until timeout. + SleepFor(MonoDelta::FromMilliseconds(20)); + } } while (!s.ok()); LOG(INFO) << "Successfully verified " << expected << " rows";
