diff --git a/physical/mysql/mysql_test.go b/physical/mysql/mysql_test.go index 20de019caa..27d596b95e 100644 --- a/physical/mysql/mysql_test.go +++ b/physical/mysql/mysql_test.go @@ -233,9 +233,8 @@ func TestMySQLHABackend_LockFailPanic(t *testing.T) { t.Fatalf("lock 2: %v", err) } - // Cancel attempt in 50 msec stopCh := make(chan struct{}) - time.AfterFunc(3*time.Second, func() { + time.AfterFunc(10*time.Second, func() { close(stopCh) }) @@ -256,14 +255,13 @@ func TestMySQLHABackend_LockFailPanic(t *testing.T) { // trigger the panic shown in https://github.com/hashicorp/vault/issues/8203 cleanup() - // Cancel attempt in 50 msec stopCh2 := make(chan struct{}) - time.AfterFunc(3*time.Second, func() { + time.AfterFunc(10*time.Second, func() { close(stopCh2) }) leaderCh2, err = lock2.Lock(stopCh2) if err == nil { - t.Fatalf("expected error, got none") + t.Fatalf("expected error, got none, leaderCh2=%v", leaderCh2) } }