Skip to content

Commit edaaa0c

Browse files
committed
Adds Sleep to Cluster Annotation Test
The requireClusterReady helper in suite_helpers_test.go does not always wait until the cluster is truly ready. Consequently, 'on_update' in cluster_annotation_test.go flakes, attempting to run update on a pod that isn't ready. [sc-15828]
1 parent aba4fcc commit edaaa0c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

testing/pgo_cli/cluster_annotation_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ func TestClusterAnnotation(t *testing.T) {
216216
requirePgBouncerReady(t, namespace(), test.testName, (2 * time.Minute))
217217
}
218218

219+
// Allow pods time to reach ready status before running update.
220+
time.Sleep(time.Minute + 30*time.Second)
221+
219222
updateCMD := []string{"update", "cluster", test.testName, "-n", namespace(), "--no-prompt"}
220223
updateCMD = append(updateCMD, test.addFlags...)
221224
output, err = pgo(updateCMD...).Exec(t)

0 commit comments

Comments
 (0)