Sfoglia il codice sorgente

update test and readme

Jonathan Turner 7 anni fa
parent
commit
ab5ff8c208
2 ha cambiato i file con 7 aggiunte e 4 eliminazioni
  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.
 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 KDC and FAST negotiation
 Active Directory does not commonly support FAST negotiation so you will need to disable this on the client.
 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:
 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()
 	n := runtime.NumGoroutine()
 	time.Sleep(time.Second * 120)
 	time.Sleep(time.Second * 120)
 	cl.Destroy()
 	cl.Destroy()
+	time.Sleep(time.Second * 10)
 	m := runtime.NumGoroutine()
 	m := runtime.NumGoroutine()
 	t.Logf("DESTROY: %d %d", n, m)
 	t.Logf("DESTROY: %d %d", n, m)
 	assert.True(t, m < n, "auto-renewal goroutine was not stopped when client destroyed")
 	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")
 	assert.False(t, is, "client is still configured after it was destroyed")
 }
 }