From 3b13e52f6fb62653a3f82b497f900c3606c5ab34 Mon Sep 17 00:00:00 2001 From: Christian Kruse Date: Mon, 9 Oct 2023 09:22:11 -0700 Subject: [PATCH] fix potentially flakey tests Signed-off-by: Christian Kruse --- pkg/processor/k8sprocessor/kube/owner_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/processor/k8sprocessor/kube/owner_test.go b/pkg/processor/k8sprocessor/kube/owner_test.go index 0232f19166..b5099fa66b 100644 --- a/pkg/processor/k8sprocessor/kube/owner_test.go +++ b/pkg/processor/k8sprocessor/kube/owner_test.go @@ -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 { @@ -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 {