Skip to content

Commit

Permalink
separate config from consumer start
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Apr 17, 2024
1 parent 1d31500 commit be653ae
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions integration-tests/smoke/automation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ func SetupAutomationBasic(t *testing.T, nodeUpgrade bool) {
isMercury,
)

for i := 0; i < len(upkeepIDs); i++ {
if isMercury {
if isMercury {
for i := 0; i < len(upkeepIDs); i++ {
// Set privilege config to enable mercury
privilegeConfigBytes, _ := json.Marshal(streams.UpkeepPrivilegeConfig{
MercuryEnabled: true,
Expand All @@ -152,8 +152,10 @@ func SetupAutomationBasic(t *testing.T, nodeUpgrade bool) {
}
l.Info().Int("Upkeep index", i).Msg("Upkeep privilege config set")
}
}

if isLogTrigger || isMercuryV02 {
if isLogTrigger || isMercuryV02 {
for i := 0; i < len(upkeepIDs); i++ {
if err := consumers[i].Start(); err != nil {
l.Error().Msg("Error when starting consumer")
return
Expand Down Expand Up @@ -1122,7 +1124,7 @@ func TestAutomationCheckPerformGasLimit(t *testing.T) {
}

// Upkeep should now start performing
l.Info().Msg("Waiting for 2m for all contracts to perform at least one upkeep after gas limit increase")
l.Info().Msg("Waiting for 4m for all contracts to perform at least one upkeep after gas limit increase")
gom.Eventually(func(g gomega.Gomega) {
for i := 0; i < len(upkeepIDs); i++ {
cnt, err := consumersPerformance[i].GetUpkeepCount(testcontext.Get(t))
Expand All @@ -1131,7 +1133,7 @@ func TestAutomationCheckPerformGasLimit(t *testing.T) {
"Expected consumer counter to be greater than 0, but got %d", cnt.Int64(),
)
}
}, "3m", "1s").Should(gomega.Succeed()) // ~1m to perform once, 1m buffer
}, "4m", "1s").Should(gomega.Succeed()) // ~1m to perform once, 1m buffer

// Now increase the checkGasBurn on consumer, upkeep should stop performing
l.Info().Msg("Increasing check gas limit for upkeeps")
Expand Down

0 comments on commit be653ae

Please sign in to comment.