Apply feedback

This commit is contained in:
Joe Betz 2024-06-04 14:44:08 -04:00
parent f8a33e3679
commit 5db9eff04f

View File

@ -299,7 +299,8 @@ func TestNoOpApplyWithEmptyMap(t *testing.T) {
t.Fatalf("Failed to create object: %v", err) 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) time.Sleep(1 * time.Second)
createdObject, err := client.AppsV1().RESTClient().Get().Namespace("default").Resource(deploymentsResource).Name(deploymentName).Do(context.TODO()).Get() createdObject, err := client.AppsV1().RESTClient().Get().Namespace("default").Resource(deploymentsResource).Name(deploymentName).Do(context.TODO()).Get()