Skip to content

Commit

Permalink
fix potentially flakey tests
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Kruse <[email protected]>
  • Loading branch information
c-kruse committed Oct 9, 2023
1 parent 8b96bdb commit 3b13e52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/processor/k8sprocessor/kube/owner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,10 +569,10 @@ func Test_OwnerProvider_GetServices(t *testing.T) {
return services[0] == "my-service-2"
}, 5*time.Second, 10*time.Millisecond)

deleteSentAt := time.Now()
err = c.CoreV1().Endpoints(namespace).
Delete(context.Background(), endpoints2.Name, metav1.DeleteOptions{})
require.NoError(t, err)
deleteSentAt := time.Now()

var ttd time.Duration
assert.Eventually(t, func() bool {
Expand Down Expand Up @@ -862,10 +862,10 @@ func Test_OwnerProvider_GetNamespace(t *testing.T) {
return true
}, 5*time.Second, 5*time.Millisecond)

deleteSentAt := time.Now()
err = c.CoreV1().Namespaces().Delete(
context.Background(), "testns", metav1.DeleteOptions{})
require.NoError(t, err)
deleteSentAt := time.Now()

var ttd time.Duration
assert.Eventually(t, func() bool {
Expand Down

0 comments on commit 3b13e52

Please sign in to comment.