Skip to content

Commit

Permalink
Fix flaky instance deletion test
Browse files Browse the repository at this point in the history
In many cases, envtest.K8sDeleteWithRetry() will time out before an instance gets deleted. Switch to using envtest.K8sDeleteWithRetryNoWait() and check that the Instance was deleted in the core test assertion instead of in the helper method.

Change-Id: Iae8966b7a4e2be14bde0e8ef4a73d21322fd324b
  • Loading branch information
akinfermo authored and kurt-google committed Nov 2, 2022
1 parent f404aa5 commit d357f34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oracle/controllers/inttest/instancetest/instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func deleteInstance(ctx context.Context, instanceName, namespace string) {
Name: instanceName,
},
}
testhelpers.K8sDeleteWithRetry(k8sEnv.K8sClient, ctx, client.ObjectKey{Name: instanceName, Namespace: namespace}, instance)
testhelpers.K8sDeleteWithRetryNoWait(k8sEnv.K8sClient, ctx, client.ObjectKey{Name: instanceName, Namespace: namespace}, instance)
}

func deleteDatabase(ctx context.Context, databaseName, namespace string) {
Expand Down

0 comments on commit d357f34

Please sign in to comment.