|
@@ -750,12 +750,10 @@ func TestClient_Destroy(t *testing.T) {
|
|
|
t.Fatalf("error getting service ticket: %v\n", err)
|
|
t.Fatalf("error getting service ticket: %v\n", err)
|
|
|
}
|
|
}
|
|
|
n := runtime.NumGoroutine()
|
|
n := runtime.NumGoroutine()
|
|
|
- time.Sleep(time.Second * 120)
|
|
|
|
|
|
|
+ time.Sleep(time.Second * 60)
|
|
|
cl.Destroy()
|
|
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()
|
|
is, _ := cl.IsConfigured()
|
|
|
assert.False(t, is, "client is still configured after it was destroyed")
|
|
assert.False(t, is, "client is still configured after it was destroyed")
|
|
|
}
|
|
}
|