Skip to content

Commit

Permalink
chore: increase timeouts in workflow_syncer_test
Browse files Browse the repository at this point in the history
  • Loading branch information
erikburt committed Dec 30, 2024
1 parent e13f07c commit 91f2526
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/services"
"github.com/smartcontractkit/chainlink-common/pkg/services/servicetest"
"github.com/smartcontractkit/chainlink-common/pkg/types"
"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
"github.com/smartcontractkit/chainlink-common/pkg/workflows"
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/workflow/generated/workflow_registry_wrapper"
coretestutils "github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
Expand Down Expand Up @@ -151,7 +152,7 @@ func Test_EventHandlerStateSync(t *testing.T) {
require.Eventually(t, func() bool {
numEvents := len(testEventHandler.GetEvents())
return numEvents == numberWorkflows
}, 5*time.Second, time.Second)
}, tests.WaitTimeout(t), 100*time.Millisecond)

for _, event := range testEventHandler.GetEvents() {
assert.Equal(t, syncer.WorkflowRegisteredEvent, event.GetEventType())
Expand Down Expand Up @@ -216,7 +217,7 @@ func Test_EventHandlerStateSync(t *testing.T) {
}

return false
}, 50*time.Second, time.Second)
}, tests.WaitTimeout(t), 100*time.Millisecond)
}

func Test_InitialStateSync(t *testing.T) {
Expand Down Expand Up @@ -276,7 +277,7 @@ func Test_InitialStateSync(t *testing.T) {

require.Eventually(t, func() bool {
return len(testEventHandler.GetEvents()) == numberWorkflows
}, 5*time.Second, time.Second)
}, tests.WaitTimeout(t), 100*time.Millisecond)

for _, event := range testEventHandler.GetEvents() {
assert.Equal(t, syncer.WorkflowRegisteredEvent, event.GetEventType())
Expand Down Expand Up @@ -380,7 +381,7 @@ func Test_SecretsWorker(t *testing.T) {
lggr.Debugf("got secrets %v", secrets)
require.NoError(t, err)
return secrets == wantContents
}, 15*time.Second, time.Second)
}, tests.WaitTimeout(t), 100*time.Millisecond)
}

func Test_RegistrySyncer_WorkflowRegistered_InitiallyPaused(t *testing.T) {
Expand Down Expand Up @@ -459,7 +460,7 @@ func Test_RegistrySyncer_WorkflowRegistered_InitiallyPaused(t *testing.T) {
owner := strings.ToLower(backendTH.ContractsOwner.From.Hex()[2:])
_, err := orm.GetWorkflowSpec(ctx, owner, "test-wf")
return err == nil
}, 15*time.Second, time.Second)
}, tests.WaitTimeout(t), 100*time.Millisecond)
}

type mockService struct{}
Expand Down Expand Up @@ -567,7 +568,7 @@ func Test_RegistrySyncer_WorkflowRegistered_InitiallyActivated(t *testing.T) {
owner := strings.ToLower(backendTH.ContractsOwner.From.Hex()[2:])
_, err = orm.GetWorkflowSpec(ctx, owner, "test-wf")
return err == nil
}, 15*time.Second, time.Second)
}, tests.WaitTimeout(t), 100*time.Millisecond)
}

func updateAuthorizedAddress(
Expand Down

0 comments on commit 91f2526

Please sign in to comment.