@@ -81,7 +81,7 @@ func TestMultiNode_Dial(t *testing.T) {
8181 selectionMode : NodeSelectionModeRoundRobin ,
8282 chainID : RandomID (),
8383 })
84- err := mn .Start (tests .Context (t ))
84+ err := mn .Start (t .Context ())
8585 assert .ErrorContains (t , err , fmt .Sprintf ("no available nodes for chain %s" , mn .chainID ))
8686 })
8787 t .Run ("Fails with wrong node's chainID" , func (t * testing.T ) {
@@ -97,7 +97,7 @@ func TestMultiNode_Dial(t *testing.T) {
9797 chainID : multiNodeChainID ,
9898 nodes : []Node [ID , multiNodeRPCClient ]{node },
9999 })
100- err := mn .Start (tests .Context (t ))
100+ err := mn .Start (t .Context ())
101101 assert .ErrorContains (t , err , fmt .Sprintf ("node %s has configured chain ID %s which does not match multinode configured chain ID of %s" , nodeName , nodeChainID , mn .chainID ))
102102 })
103103 t .Run ("Fails if node fails" , func (t * testing.T ) {
@@ -113,7 +113,7 @@ func TestMultiNode_Dial(t *testing.T) {
113113 chainID : chainID ,
114114 nodes : []Node [ID , multiNodeRPCClient ]{node },
115115 })
116- err := mn .Start (tests .Context (t ))
116+ err := mn .Start (t .Context ())
117117 assert .ErrorIs (t , err , expectedError )
118118 })
119119
@@ -132,7 +132,7 @@ func TestMultiNode_Dial(t *testing.T) {
132132 chainID : chainID ,
133133 nodes : []Node [ID , multiNodeRPCClient ]{node1 , node2 },
134134 })
135- err := mn .Start (tests .Context (t ))
135+ err := mn .Start (t .Context ())
136136 assert .ErrorIs (t , err , expectedError )
137137 })
138138 t .Run ("Fails with wrong send only node's chainID" , func (t * testing.T ) {
@@ -151,7 +151,7 @@ func TestMultiNode_Dial(t *testing.T) {
151151 nodes : []Node [ID , multiNodeRPCClient ]{node },
152152 sendonlys : []SendOnlyNode [ID , multiNodeRPCClient ]{sendOnly },
153153 })
154- err := mn .Start (tests .Context (t ))
154+ err := mn .Start (t .Context ())
155155 assert .ErrorContains (t , err , fmt .Sprintf ("sendonly node %s has configured chain ID %s which does not match multinode configured chain ID of %s" , sendOnlyName , sendOnlyChainID , mn .chainID ))
156156 })
157157
@@ -178,7 +178,7 @@ func TestMultiNode_Dial(t *testing.T) {
178178 nodes : []Node [ID , multiNodeRPCClient ]{node },
179179 sendonlys : []SendOnlyNode [ID , multiNodeRPCClient ]{sendOnly1 , sendOnly2 },
180180 })
181- err := mn .Start (tests .Context (t ))
181+ err := mn .Start (t .Context ())
182182 assert .ErrorIs (t , err , expectedError )
183183 })
184184 t .Run ("Starts successfully with healthy nodes" , func (t * testing.T ) {
@@ -192,7 +192,7 @@ func TestMultiNode_Dial(t *testing.T) {
192192 sendonlys : []SendOnlyNode [ID , multiNodeRPCClient ]{newHealthySendOnly (t , chainID )},
193193 })
194194 servicetest .Run (t , mn )
195- selectedNode , err := mn .selectNode (tests .Context (t ))
195+ selectedNode , err := mn .selectNode (t .Context ())
196196 require .NoError (t , err )
197197 assert .Equal (t , node , selectedNode )
198198 })
@@ -336,7 +336,7 @@ func TestMultiNode_selectNode(t *testing.T) {
336336 t .Parallel ()
337337 t .Run ("Returns same node, if it's still healthy" , func (t * testing.T ) {
338338 t .Parallel ()
339- ctx := tests .Context (t )
339+ ctx := t .Context ()
340340 chainID := RandomID ()
341341 node1 := newMockNode [ID , multiNodeRPCClient ](t )
342342 node1 .On ("State" ).Return (nodeStateAlive ).Once ()
@@ -360,7 +360,7 @@ func TestMultiNode_selectNode(t *testing.T) {
360360 })
361361 t .Run ("Updates node if active is not healthy" , func (t * testing.T ) {
362362 t .Parallel ()
363- ctx := tests .Context (t )
363+ ctx := t .Context ()
364364 chainID := RandomID ()
365365 oldBest := newMockNode [ID , multiNodeRPCClient ](t )
366366 oldBest .On ("String" ).Return ("oldBest" ).Maybe ()
@@ -387,7 +387,7 @@ func TestMultiNode_selectNode(t *testing.T) {
387387 })
388388 t .Run ("No active nodes - reports critical error" , func (t * testing.T ) {
389389 t .Parallel ()
390- ctx := tests .Context (t )
390+ ctx := t .Context ()
391391 chainID := RandomID ()
392392 lggr , observedLogs := logger .TestObserved (t , zap .InfoLevel )
393393 mn := newTestMultiNode (t , multiNodeOpts {
0 commit comments