Clean(er) shutdown of apiserver integration tests
This commit is contained in:
@@ -35,11 +35,11 @@ import (
|
||||
|
||||
// Tests that the apiserver retries patches
|
||||
func TestPatchConflicts(t *testing.T) {
|
||||
_, clientSet, closeFn := setup(t)
|
||||
defer closeFn()
|
||||
clientSet, _, tearDownFn := setup(t)
|
||||
defer tearDownFn()
|
||||
|
||||
ns := framework.CreateTestingNamespace("status-code", t)
|
||||
defer framework.DeleteTestingNamespace(ns, t)
|
||||
ns := framework.CreateNamespaceOrDie(clientSet, "status-code", t)
|
||||
defer framework.DeleteNamespaceOrDie(clientSet, ns, t)
|
||||
|
||||
numOfConcurrentPatches := 100
|
||||
|
||||
@@ -64,7 +64,10 @@ func TestPatchConflicts(t *testing.T) {
|
||||
}
|
||||
|
||||
// Create the object we're going to conflict on
|
||||
clientSet.CoreV1().Secrets(ns.Name).Create(context.TODO(), secret, metav1.CreateOptions{})
|
||||
_, err := clientSet.CoreV1().Secrets(ns.Name).Create(context.TODO(), secret, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
client := clientSet.CoreV1().RESTClient()
|
||||
|
||||
successes := int32(0)
|
||||
|
Reference in New Issue
Block a user