Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix log poll period for vrf on-demand load test #11265

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion integration-tests/actions/vrfv2plus/vrfv2plus_steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions integration-tests/client/chainlink_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 9 additions & 7 deletions integration-tests/load/vrfv2plus/vrfv2plus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions integration-tests/types/config/node/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Loading