diff --git a/clientv3/integration/leasing_test.go b/clientv3/integration/leasing_test.go index a824726f0..affb6642a 100644 --- a/clientv3/integration/leasing_test.go +++ b/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()). diff --git a/integration/v3_lease_test.go b/integration/v3_lease_test.go index 756407a37..8a3d93cda 100644 --- a/integration/v3_lease_test.go +++ b/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)