Jonathan Turner 7 лет назад
Родитель
Сommit
d25438e43e
1 измененных файлов с 3 добавлено и 5 удалено
  1. 3 5
      client/client_integration_test.go

+ 3 - 5
client/client_integration_test.go

@@ -750,12 +750,10 @@ func TestClient_Destroy(t *testing.T) {
 		t.Fatalf("error getting service ticket: %v\n", err)
 	}
 	n := runtime.NumGoroutine()
-	time.Sleep(time.Second * 120)
+	time.Sleep(time.Second * 60)
 	cl.Destroy()
-	time.Sleep(time.Second * 10)
-	m := runtime.NumGoroutine()
-	t.Logf("DESTROY: %d %d", n, m)
-	assert.True(t, m < n, "auto-renewal goroutine was not stopped when client destroyed")
+	time.Sleep(time.Second * 5)
+	assert.True(t, runtime.NumGoroutine() < n, "auto-renewal goroutine was not stopped when client destroyed")
 	is, _ := cl.IsConfigured()
 	assert.False(t, is, "client is still configured after it was destroyed")
 }