From e647e0416b83666ee23e09315234af917653ad67 Mon Sep 17 00:00:00 2001 From: Makram Kamaleddine Date: Mon, 13 Nov 2023 11:27:30 +0200 Subject: [PATCH] chore: set correct log poll period in test --- .../actions/vrfv2plus/vrfv2plus_steps.go | 5 ++++- integration-tests/client/chainlink_models.go | 1 + .../load/vrfv2plus/vrfv2plus_test.go | 16 +++++++++------- integration-tests/types/config/node/core.go | 6 ++++++ 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/integration-tests/actions/vrfv2plus/vrfv2plus_steps.go b/integration-tests/actions/vrfv2plus/vrfv2plus_steps.go index e964623fb2e..094457c2627 100644 --- a/integration-tests/actions/vrfv2plus/vrfv2plus_steps.go +++ b/integration-tests/actions/vrfv2plus/vrfv2plus_steps.go @@ -15,6 +15,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/google/uuid" "github.com/rs/zerolog" + "github.com/smartcontractkit/chainlink-testing-framework/blockchain" "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/actions/vrfv2plus/vrfv2plus_config" @@ -176,6 +177,7 @@ func CreateVRFV2PlusJob( ExternalJobID: jobUUID.String(), ObservationSource: ost, BatchFulfillmentEnabled: false, + PollPeriod: time.Second, }) if err != nil { return nil, fmt.Errorf("%s, err %w", ErrCreatingVRFv2PlusJob, err) @@ -338,8 +340,9 @@ func SetupVRFV2_5Environment( } nodeConfig := node.NewConfig(env.ClCluster.Nodes[0].NodeConfig, node.WithVRFv2EVMEstimator(addr), + node.WithLogPollInterval(1*time.Second), ) - l.Info().Msg("Restarting Node with new sending key PriceMax configuration") + l.Info().Msg("Restarting Node with new sending key PriceMax configuration and log poll period configuration") err = env.ClCluster.Nodes[0].Restart(nodeConfig) if err != nil { return nil, nil, nil, fmt.Errorf("%s, err %w", ErrRestartCLNode, err) diff --git a/integration-tests/client/chainlink_models.go b/integration-tests/client/chainlink_models.go index c6d1209d2ea..73a84b55ee1 100644 --- a/integration-tests/client/chainlink_models.go +++ b/integration-tests/client/chainlink_models.go @@ -1127,6 +1127,7 @@ type VRFV2PlusJobSpec struct { BatchFulfillmentEnabled bool `toml:"batchFulfillmentEnabled"` BackOffInitialDelay time.Duration `toml:"backOffInitialDelay"` BackOffMaxDelay time.Duration `toml:"backOffMaxDelay"` + PollPeriod time.Duration `toml:"pollPeriod"` } // Type returns the type of the job diff --git a/integration-tests/load/vrfv2plus/vrfv2plus_test.go b/integration-tests/load/vrfv2plus/vrfv2plus_test.go index 4d3de014bcd..625510af6f9 100644 --- a/integration-tests/load/vrfv2plus/vrfv2plus_test.go +++ b/integration-tests/load/vrfv2plus/vrfv2plus_test.go @@ -2,19 +2,21 @@ package loadvrfv2plus import ( "context" - "github.com/ethereum/go-ethereum/common" - "github.com/kelseyhightower/envconfig" - "github.com/rs/zerolog/log" - "github.com/smartcontractkit/chainlink-testing-framework/logging" - "github.com/smartcontractkit/chainlink/integration-tests/testreporters" - "github.com/smartcontractkit/wasp" - "github.com/stretchr/testify/require" "math/big" "os" "sync" "testing" "time" + "github.com/ethereum/go-ethereum/common" + "github.com/kelseyhightower/envconfig" + "github.com/rs/zerolog/log" + "github.com/smartcontractkit/wasp" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-testing-framework/logging" + "github.com/smartcontractkit/chainlink/integration-tests/testreporters" + "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/actions/vrfv2plus" "github.com/smartcontractkit/chainlink/integration-tests/actions/vrfv2plus/vrfv2plus_config" diff --git a/integration-tests/types/config/node/core.go b/integration-tests/types/config/node/core.go index 37047cdb667..8f7fbdc1952 100644 --- a/integration-tests/types/config/node/core.go +++ b/integration-tests/types/config/node/core.go @@ -238,3 +238,9 @@ func WithVRFv2EVMEstimator(addr string) NodeConfigOpt { } } } + +func WithLogPollInterval(interval time.Duration) NodeConfigOpt { + return func(c *chainlink.Config) { + c.EVM[0].Chain.LogPollInterval = models.MustNewDuration(interval) + } +}