Fix TestAutoSyncSelfHealEnabled test flakiness (#2282)

This commit is contained in:
Alexander Matyushentsev 2019-09-10 10:38:11 -07:00 committed by Alex Collins
parent 39cb8db3e1
commit 5d606cae2f

View file

@ -71,6 +71,8 @@ func TestAutoSyncSelfHealEnabled(t *testing.T) {
When().
// SyncError condition should be removed after successful sync
PatchFile("guestbook-ui-deployment.yaml", `[{"op": "replace", "path": "/spec/revisionHistoryLimit", "value": 1}]`).
// Trigger refresh twice to make sure controller notices previously failed sync attempt before expectation timeout expires
Refresh(RefreshTypeNormal).
Refresh(RefreshTypeNormal).Then().
Expect(OperationPhaseIs(OperationSucceeded)).
Expect(SyncStatusIs(SyncStatusCodeSynced)).