This is an automated email from the ASF dual-hosted git repository. adar pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 8c14875659b7edd0f4353e945351eada8d5fb9e3 Author: Xiaokai Wang <[email protected]> AuthorDate: Sat Aug 3 09:43:58 2019 +0800 testcase: TestTSRegisters adds ts seqno checking after ts restarts Change-Id: Ic46674c007be05057c0ef614dc097e44b2acf303 Reviewed-on: http://gerrit.cloudera.org:8080/13988 Reviewed-by: Adar Dembo <[email protected]> Tested-by: Adar Dembo <[email protected]> --- src/kudu/integration-tests/registration-test.cc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/kudu/integration-tests/registration-test.cc b/src/kudu/integration-tests/registration-test.cc index def3b9e..4bb712d 100644 --- a/src/kudu/integration-tests/registration-test.cc +++ b/src/kudu/integration-tests/registration-test.cc @@ -246,11 +246,22 @@ TEST_F(RegistrationTest, TestTSRegisters) { cluster_->mini_master()->Shutdown(); ASSERT_OK(cluster_->mini_master()->Restart()); - ASSERT_OK(cluster_->WaitForTabletServerCount(1)); + int64_t seqno = descs.back()->latest_seqno(); + descs.clear(); + ASSERT_OK(cluster_->WaitForTabletServerCount( + 1, InternalMiniCluster::MatchMode::MATCH_TSERVERS, &descs)); + ASSERT_EQ(descs.back()->latest_seqno(), seqno); + + // Restart the tserver, so it will register, and ensure that it gets the + // newer sequence number. + cluster_->mini_tablet_server(0)->Shutdown(); + ASSERT_OK(cluster_->mini_tablet_server(0)->Restart()); - // TODO: when the instance ID / sequence number stuff is implemented, - // restart the TS and ensure that it re-registers with the newer sequence - // number. + seqno = descs.back()->latest_seqno(); + descs.clear(); + ASSERT_OK(cluster_->WaitForTabletServerCount( + 1, InternalMiniCluster::MatchMode::MATCH_TSERVERS, &descs)); + ASSERT_GT(descs.back()->latest_seqno(), seqno); } TEST_F(RegistrationTest, TestMasterSoftwareVersion) {
