Jonathan Turner пре 7 година
родитељ
комит
ab5ff8c208
2 измењених фајлова са 7 додато и 4 уклоњено
  1. 5 0
      README.md
  2. 2 4
      client/client_integration_test.go

+ 5 - 0
README.md

@@ -89,6 +89,11 @@ err := cl.Login()
 ```
 Kerberos Ticket Granting Tickets (TGT) will be automatically renewed unless the client was created from a CCache.
 
+A client can be destroyed with the following method:
+```go
+cl.Destroy()
+```
+
 #### Active Directory KDC and FAST negotiation
 Active Directory does not commonly support FAST negotiation so you will need to disable this on the client.
 If this is the case you will see this error:

+ 2 - 4
client/client_integration_test.go

@@ -752,12 +752,10 @@ func TestClient_Destroy(t *testing.T) {
 	n := runtime.NumGoroutine()
 	time.Sleep(time.Second * 120)
 	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")
-	is, err := cl.IsConfigured()
-	if err != nil {
-		t.Errorf("error checking if destroyed client is configured: %v", err)
-	}
+	is, _ := cl.IsConfigured()
 	assert.False(t, is, "client is still configured after it was destroyed")
 }