kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aw...@apache.org
Subject [kudu] 01/03: test: deflake TabletReplicaTest.TestRollLogSegmentSchemaOnAlter
Date Wed, 27 Feb 2019 02:14:44 GMT
This is an automated email from the ASF dual-hosted git repository.

awong pushed a commit to branch branch-1.9.x
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 98237d2c85eb3ef8fe501b9ad623eb2213b0b327
Author: Andrew Wong <awong@cloudera.com>
AuthorDate: Tue Feb 26 13:06:52 2019 -0800

    test: deflake TabletReplicaTest.TestRollLogSegmentSchemaOnAlter
    
    We should wait for the replica to become leader so it's usable for
    writes. Without this fix, the test failed 81/1000 times in release mode,
    and passed 1000/1000 with it.
    
    Change-Id: Ie6016f717183ca7bcf98c0874a24f1463e113cef
    Reviewed-on: http://gerrit.cloudera.org:8080/12597
    Reviewed-by: Adar Dembo <adar@cloudera.com>
    Tested-by: Kudu Jenkins
---
 src/kudu/tablet/tablet_replica-test.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/kudu/tablet/tablet_replica-test.cc b/src/kudu/tablet/tablet_replica-test.cc
index 4cf9f03..a0960cc 100644
--- a/src/kudu/tablet/tablet_replica-test.cc
+++ b/src/kudu/tablet/tablet_replica-test.cc
@@ -233,6 +233,9 @@ class TabletReplicaTest : public KuduTabletTest {
                                      scoped_refptr<ResultTracker>(),
                                      log,
                                      prepare_pool_.get()));
+    // Wait for the replica to be usable.
+    const MonoDelta kTimeout = MonoDelta::FromSeconds(30);
+    ASSERT_OK(tablet_replica_->consensus()->WaitUntilLeaderForTests(kTimeout));
   }
 
  protected:


Mime
View raw message