This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new f6bff90 [test] fix flakiness in RegistrationTest.TestTSRegisters
f6bff90 is described below
commit f6bff905941b0c5a3fea3e94319e919cb94c8c47
Author: Alexey Serbin <[email protected]>
AuthorDate: Fri Apr 30 16:12:57 2021 -0700
[test] fix flakiness in RegistrationTest.TestTSRegisters
This patch fixes a flakiness in RegistrationTest.TestTSRegisters.
I noticed that the test scenario failed in a pre-commit verification
build for one of my in-flight patches. I took a quick look and found
that the scenario had a history of flakiness, indeed [1].
Apparently, there was a mistake in the code, but it was concealed by a
race condition. Once I added a 100ms pause just before the line
this patch removes, the test scenario started failing all the time.
[1]
http://dist-test.cloudera.org:8080/test_drilldown?test_name=registration-test
Change-Id: Ic6b072409d2a68bc2ad621c1c021b0f4b3143fb2
Reviewed-on: http://gerrit.cloudera.org:8080/17377
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <[email protected]>
---
src/kudu/integration-tests/registration-test.cc | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/kudu/integration-tests/registration-test.cc
b/src/kudu/integration-tests/registration-test.cc
index fc87982..4241bd6 100644
--- a/src/kudu/integration-tests/registration-test.cc
+++ b/src/kudu/integration-tests/registration-test.cc
@@ -226,7 +226,7 @@ class RegistrationTest : public KuduTest {
TEST_F(RegistrationTest, TestTSRegisters) {
// Wait for the TS to register.
- vector<shared_ptr<TSDescriptor> > descs;
+ vector<shared_ptr<TSDescriptor>> descs;
ASSERT_OK(cluster_->WaitForTabletServerCount(
1, InternalMiniCluster::MatchMode::MATCH_TSERVERS, &descs));
ASSERT_EQ(1, descs.size());
@@ -247,7 +247,7 @@ TEST_F(RegistrationTest, TestTSRegisters) {
cluster_->mini_master()->Shutdown();
ASSERT_OK(cluster_->mini_master()->Restart());
- int64_t seqno = descs.back()->latest_seqno();
+ const int64_t seqno = descs.back()->latest_seqno();
descs.clear();
ASSERT_OK(cluster_->WaitForTabletServerCount(
1, InternalMiniCluster::MatchMode::MATCH_TSERVERS, &descs));
@@ -258,7 +258,6 @@ TEST_F(RegistrationTest, TestTSRegisters) {
cluster_->mini_tablet_server(0)->Shutdown();
ASSERT_OK(cluster_->mini_tablet_server(0)->Restart());
- seqno = descs.back()->latest_seqno();
descs.clear();
ASSERT_OK(cluster_->WaitForTabletServerCount(
1, InternalMiniCluster::MatchMode::MATCH_TSERVERS, &descs));