From 5db9eff04f163691687ef9835295d7177741de29 Mon Sep 17 00:00:00 2001 From: Joe Betz Date: Tue, 4 Jun 2024 14:44:08 -0400 Subject: [PATCH] Apply feedback --- test/integration/apiserver/apply/apply_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/integration/apiserver/apply/apply_test.go b/test/integration/apiserver/apply/apply_test.go index a61c11db8ab..3872c97b779 100644 --- a/test/integration/apiserver/apply/apply_test.go +++ b/test/integration/apiserver/apply/apply_test.go @@ -299,7 +299,8 @@ func TestNoOpApplyWithEmptyMap(t *testing.T) { t.Fatalf("Failed to create object: %v", err) } - // Sleep for one second to make sure that the times of each update operation is different. + // This sleep is necessary to consistently produce different timestamps because the time field in managedFields has + // 1 second granularity and if both apply requests happen during the same second, this test would flake. time.Sleep(1 * time.Second) createdObject, err := client.AppsV1().RESTClient().Get().Namespace("default").Resource(deploymentsResource).Name(deploymentName).Do(context.TODO()).Get()