@@ -48,10 +48,10 @@ func TestStartSendOnlyNode(t *testing.T) {
4848 s := NewSendOnlyNode (lggr , makeMockNodeMetrics (t ), url.URL {}, t .Name (), RandomID (), client )
4949
5050 defer func () { assert .NoError (t , s .Close ()) }()
51+ assert .Equal (t , nodeStateUndialed , s .State ())
5152 err := s .Start (tests .Context (t ))
5253 require .NoError (t , err )
5354
54- assert .Equal (t , nodeStateUndialed , s .State ())
5555 tests .AssertEventually (t , func () bool { return s .State () == nodeStateUnusable })
5656 tests .RequireLogMessage (t , observedLogs , "Dial failed: SendOnly Node is unusable" )
5757 })
@@ -64,10 +64,10 @@ func TestStartSendOnlyNode(t *testing.T) {
6464 s := NewSendOnlyNode (lggr , makeMockNodeMetrics (t ), url.URL {}, t .Name (), NewIDFromInt (0 ), client )
6565
6666 defer func () { assert .NoError (t , s .Close ()) }()
67+ assert .Equal (t , nodeStateUndialed , s .State ())
6768 err := s .Start (tests .Context (t ))
6869 require .NoError (t , err )
6970
70- assert .Equal (t , nodeStateUndialed , s .State ())
7171 tests .AssertEventually (t , func () bool { return s .State () == nodeStateAlive })
7272 tests .RequireLogMessage (t , observedLogs , "sendonly rpc ChainID verification skipped" )
7373 })
@@ -86,10 +86,10 @@ func TestStartSendOnlyNode(t *testing.T) {
8686 s := NewSendOnlyNode (lggr , metrics , url.URL {}, t .Name (), chainID , client )
8787
8888 defer func () { assert .NoError (t , s .Close ()) }()
89+ assert .Equal (t , nodeStateUndialed , s .State ())
8990 err := s .Start (tests .Context (t ))
9091 require .NoError (t , err )
9192
92- assert .Equal (t , nodeStateUndialed , s .State ())
9393 tests .AssertEventually (t , func () bool { return s .State () == nodeStateUnreachable })
9494 tests .AssertLogCountEventually (t , observedLogs , fmt .Sprintf ("Verify failed: %v" , expectedError ), failuresCount )
9595 client .On ("ChainID" , mock .Anything ).Return (chainID , nil )
@@ -112,10 +112,10 @@ func TestStartSendOnlyNode(t *testing.T) {
112112 s := NewSendOnlyNode (lggr , metrics , url.URL {}, t .Name (), configuredChainID , client )
113113
114114 defer func () { assert .NoError (t , s .Close ()) }()
115+ assert .Equal (t , nodeStateUndialed , s .State ())
115116 err := s .Start (tests .Context (t ))
116117 require .NoError (t , err )
117118
118- assert .Equal (t , nodeStateUndialed , s .State ())
119119 tests .AssertEventually (t , func () bool { return s .State () == nodeStateInvalidChainID })
120120 tests .AssertLogCountEventually (t , observedLogs , "sendonly rpc ChainID doesn't match local chain ID" , failuresCount )
121121 tests .AssertEventually (t , func () bool {
0 commit comments