@@ -13,6 +13,7 @@ import (
1313 "github.com/smartcontractkit/chainlink-ccv/devenv/cciptestinterfaces"
1414 "github.com/smartcontractkit/chainlink-ccv/devenv/evm"
1515 "github.com/smartcontractkit/chainlink-ccv/devenv/services"
16+ "github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
1617 "github.com/smartcontractkit/chainlink-testing-framework/framework"
1718 "github.com/smartcontractkit/chainlink-testing-framework/framework/chaos"
1819)
@@ -60,7 +61,7 @@ func TestChaos_AggregatorOutageRecovery(t *testing.T) {
6061
6162 runV2TestCase (t , tc , setup .chainMap , setup .defaultAggregatorClient , setup .indexerClient , AssertMessageOptions {
6263 TickInterval : 5 * time .Second ,
63- Timeout : waitTimeout (t ),
64+ Timeout : tests . WaitTimeout (t ),
6465 ExpectedVerifierResults : tc .numExpectedVerifications ,
6566 AssertVerifierLogs : false ,
6667 AssertExecutorLogs : false ,
@@ -136,7 +137,7 @@ func TestChaos_VerifierFaultToleranceThresholdViolated(t *testing.T) {
136137 setup .indexerClient ,
137138 AssertMessageOptions {
138139 TickInterval : 5 * time .Second ,
139- Timeout : waitTimeout (t ),
140+ Timeout : tests . WaitTimeout (t ),
140141 ExpectedVerifierResults : tc .numExpectedVerifications ,
141142 AssertVerifierLogs : false ,
142143 AssertExecutorLogs : false ,
@@ -179,7 +180,7 @@ func TestChaos_AllExecutorsDown(t *testing.T) {
179180
180181 runV2TestCase (t , tc , setup .chainMap , setup .defaultAggregatorClient , setup .indexerClient , AssertMessageOptions {
181182 TickInterval : 5 * time .Second ,
182- Timeout : waitTimeout (t ),
183+ Timeout : tests . WaitTimeout (t ),
183184 ExpectedVerifierResults : tc .numExpectedVerifications ,
184185 AssertVerifierLogs : false ,
185186 AssertExecutorLogs : false ,
@@ -216,21 +217,13 @@ func TestChaos_IndexerDown(t *testing.T) {
216217
217218 runV2TestCase (t , tc , setup .chainMap , setup .defaultAggregatorClient , setup .indexerClient , AssertMessageOptions {
218219 TickInterval : 5 * time .Second ,
219- Timeout : waitTimeout (t ),
220+ Timeout : tests . WaitTimeout (t ),
220221 ExpectedVerifierResults : tc .numExpectedVerifications ,
221222 AssertVerifierLogs : false ,
222223 AssertExecutorLogs : false ,
223224 })
224225}
225226
226- func waitTimeout (t * testing.T ) time.Duration {
227- deadline , ok := t .Deadline ()
228- if ! ok {
229- deadline = time .Now ().Add (10 * time .Second )
230- }
231- return time .Until (deadline )
232- }
233-
234227type chaosSetup struct {
235228 in * ccv.Cfg
236229 chains []ccv.ChainImpl
0 commit comments