Browse Source

clientv3/integration: try to fix tests

nolouch 7 years ago
parent
commit
fd5ef74b80
2 changed files with 3 additions and 0 deletions
  1. 1 0
      clientv3/integration/leasing_test.go
  2. 2 0
      integration/v3_lease_test.go

+ 1 - 0
clientv3/integration/leasing_test.go

@@ -1644,6 +1644,7 @@ func TestLeasingReconnectTxn(t *testing.T) {
 			clus.Members[0].DropConnections()
 			time.Sleep(time.Millisecond)
 		}
+		time.Sleep(10 * time.Millisecond)
 	}()
 
 	_, lerr := lkv.Txn(context.TODO()).

+ 2 - 0
integration/v3_lease_test.go

@@ -539,6 +539,8 @@ func TestV3LeaseSwitch(t *testing.T) {
 // election timeout after it loses its quorum. And the new leader extends the TTL of
 // the lease to at least TTL + election timeout.
 func TestV3LeaseFailover(t *testing.T) {
+	defer testutil.AfterTest(t)
+
 	clus := NewClusterV3(t, &ClusterConfig{Size: 3})
 	defer clus.Terminate(t)