Skip to content

Commit 3a952f2

Browse files
committed
Improve E2E load-balancing test to remove flakiness
1 parent 93d4c6d commit 3a952f2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/integration_test.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,14 @@ func Test_AccessNodeBackupFunctionality(t *testing.T) {
698698
// `ExecuteScriptAtLatestBlock`. This gRPC call is served by the
699699
// first-available AccessNode specified in `AccessNodeBackupHosts`.
700700
// In this E2E test, that would be the second Emulator process.
701-
_, err = ethClient.SyncProgress(context.Background())
702-
require.NoError(t, err)
701+
assert.Eventually(
702+
t,
703+
func() bool {
704+
_, err := ethClient.SyncProgress(context.Background())
705+
return err == nil
706+
},
707+
time.Second*5,
708+
time.Millisecond*500,
709+
"backup AN should serve requests after primary shutdown",
710+
)
703711
}

0 commit comments

Comments
 (0)