diff --git a/internal/provider/eventual_consistency.go b/internal/provider/eventual_consistency.go index e96b369e..c1cf180f 100644 --- a/internal/provider/eventual_consistency.go +++ b/internal/provider/eventual_consistency.go @@ -8,7 +8,7 @@ import ( ) // The number of consistent responses we want before we consider the resource consistent -const numConsistent = 4 +const numConsistent = 2 type consistencyCheck struct { currConsistent int diff --git a/internal/provider/eventual_consistency_test.go b/internal/provider/eventual_consistency_test.go index 43896de4..3d79680b 100644 --- a/internal/provider/eventual_consistency_test.go +++ b/internal/provider/eventual_consistency_test.go @@ -34,7 +34,7 @@ func TestConsistencyCheckReachedConsistency(t *testing.T) { t.Errorf("Failed: did not reach consistency (numInserts: %d, currConsistent: %d, etagChanges: %d, timeout: %d)", numInserts, cc.currConsistent, cc.etagChanges, int(cc.timeout.Minutes())) } - // We've seen all the inserts come through, but we haven't had 4 consistent tags yet + // We've seen all the inserts come through, but we haven't had 2 consistent tags yet cc.etagChanges = 3 cc.currConsistent = 1 @@ -42,8 +42,8 @@ func TestConsistencyCheckReachedConsistency(t *testing.T) { t.Errorf("Failed: reached consistency (numInserts: %d, currConsistent: %d, etagChanges: %d, timeout: %d)", numInserts, cc.currConsistent, cc.etagChanges, int(cc.timeout.Minutes())) } - // We've seen all the inserts come through, and it's been consistent 4 times - cc.currConsistent = 4 + // We've seen all the inserts come through, and it's been consistent 2 times + cc.currConsistent = 2 if !cc.reachedConsistency(numInserts) { t.Errorf("Failed: did not reach consistency (numInserts: %d, currConsistent: %d, etagChanges: %d, timeout: %d)", numInserts, cc.currConsistent, cc.etagChanges, int(cc.timeout.Minutes()))