From aa02ff5a1756c5c092c3ea8f155e0cc5a54b4d5f Mon Sep 17 00:00:00 2001 From: anirudhwarrier <12178754+anirudhwarrier@users.noreply.github.com> Date: Fri, 3 Nov 2023 17:00:33 +0400 Subject: [PATCH] Make DeltaStage Configurable --- integration-tests/benchmark/keeper_test.go | 7 ++++++- integration-tests/testsetups/keeper_benchmark.go | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/integration-tests/benchmark/keeper_test.go b/integration-tests/benchmark/keeper_test.go index 9342f3629b9..3a6c04651d6 100644 --- a/integration-tests/benchmark/keeper_test.go +++ b/integration-tests/benchmark/keeper_test.go @@ -131,6 +131,7 @@ var ( LinkTokenAddress = getEnv("LINKTOKENADDRESS", "") EthFeedAddress = getEnv("ETHFEEDADDRESS", "") GasFeedAddress = getEnv("GASFEEDADDRESS", "") + DeltaStageSeconds, _ = strconv.ParseInt(getEnv("DELTASTAGESECONDS", "0"), 0, 64) ) type NetworkConfig struct { @@ -151,6 +152,10 @@ func TestAutomationBenchmark(t *testing.T) { l.Info().Str("Test Name", testName).Str("Test Inputs", os.Getenv("TEST_INPUTS")).Msg("Running Benchmark Test") benchmarkTestNetwork := networkConfig[networkName] + if DeltaStageSeconds > 0 { + benchmarkTestNetwork.deltaStage = time.Duration(DeltaStageSeconds) * time.Second + } + l.Info().Str("Namespace", testEnvironment.Cfg.Namespace).Msg("Connected to Keepers Benchmark Environment") chainClient, err := blockchain.NewEVMClient(benchmarkNetwork, testEnvironment, l) @@ -261,7 +266,7 @@ var networkConfig = map[string]NetworkConfig{ funding: big.NewFloat(ChainlinkNodeFunding), }, "ArbitrumGoerli": { - upkeepSLA: int64(20), + upkeepSLA: int64(120), blockTime: time.Second, deltaStage: time.Duration(0), funding: big.NewFloat(ChainlinkNodeFunding), diff --git a/integration-tests/testsetups/keeper_benchmark.go b/integration-tests/testsetups/keeper_benchmark.go index f786cca9bb5..90800231c95 100644 --- a/integration-tests/testsetups/keeper_benchmark.go +++ b/integration-tests/testsetups/keeper_benchmark.go @@ -125,6 +125,7 @@ func (k *KeeperBenchmarkTest) Setup(env *environment.Environment) { k.keeperConsumerContracts = make([]contracts.AutomationConsumerBenchmark, len(inputs.RegistryVersions)) k.upkeepIDs = make([][]*big.Int, len(inputs.RegistryVersions)) k.log.Debug().Interface("TestInputs", inputs).Msg("Setting up benchmark test") + k.log.Info().Str("Network", inputs.BlockchainClient.GetNetworkName()).Dur("DeltaStage", inputs.DeltaStage).Msg("Starting Keeper Benchmark Test Setup") var err error // Connect to networks and prepare for contract deployment