Skip to content

Commit

Permalink
adjust timing to fix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed Jun 14, 2024
1 parent efb2b18 commit 990b571
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/services/relay/evm/chain_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ func (h *helper) Context(t *testing.T) context.Context {
}

func (h *helper) MaxWaitTimeForEvents() time.Duration {
// From trial and error, when running on CI, sometimes the boxes get slow
maxWaitTime := time.Second * 30
// There are no scheduling guarantees in a busy CI test suite. 30s was failing frequently.
maxWaitTime := 10 * time.Minute
maxWaitTimeStr, ok := os.LookupEnv("MAX_WAIT_TIME_FOR_EVENTS_S")
if ok {
waitS, err := strconv.ParseInt(maxWaitTimeStr, 10, 64)
Expand Down
2 changes: 1 addition & 1 deletion core/services/relay/evm/evmtesting/run_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func RunChainReaderEvmTests[T TestingT[T]](t T, it *EVMChainReaderInterfaceTeste

require.Eventually(t, func() bool {
return cr.GetLatestValue(ctx, AnyContractName, triggerWithDynamicTopic, input, output) == nil
}, it.MaxWaitTimeForEvents(), time.Millisecond*10)
}, it.MaxWaitTimeForEvents(), 100*time.Millisecond)

assert.Equal(t, &anyString, rOutput.FieldByName("Field").Interface())
topic, err := abi.MakeTopics([]any{anyString})
Expand Down

0 comments on commit 990b571

Please sign in to comment.