@@ -115,7 +115,7 @@ func TestAddChain_SubscribeUnsubscribeEvent(t *testing.T) {
115115 log := createLog (1 , common .HexToHash ("0x1234" ), address , []common.Hash {topic }, []byte ("event data" ), 0 )
116116
117117 // Retrieve the chain service to access the Subscription Manager.
118- chainService , exists := s .GetService ( 1 )
118+ chainService , exists := s .services [ 1 ]
119119 require .True (t , exists , "Chain service should exist" )
120120
121121 // Broadcast the log.
@@ -175,9 +175,9 @@ func TestAddChains_MultipleConsumers(t *testing.T) {
175175 logEvent2 := createLog (3 , common .HexToHash ("0x2345" ), address2 , []common.Hash {topic2 }, []byte ("another log data 2" ), 0 )
176176 logEvent3 := createLog (4 , common .HexToHash ("0x3456" ), address3 , []common.Hash {topic3 }, []byte ("another log data 3" ), 0 )
177177
178- chainService1 , exists1 := s .GetService ( 1 )
178+ chainService1 , exists1 := s .services [ 1 ]
179179 require .True (t , exists1 , "Chain service 1 should exist" )
180- chainService2 , exists2 := s .GetService ( 2 )
180+ chainService2 , exists2 := s .services [ 2 ]
181181 require .True (t , exists2 , "Chain service 2 should exist" )
182182
183183 chainService1 .SubscriptionMgr .BroadcastLog (createEventKey (address1 , topic1 ), logEvent1 )
@@ -259,5 +259,5 @@ func TestAddMultipleChains_CloseSentinel(t *testing.T) {
259259 s .Close ()
260260
261261 // Verify that all chains are cleaned up.
262- assert .False (t , s . HasServices () , "All chains should be cleaned up after Close" )
262+ assert .False (t , len ( s . services ) > 0 , "All chains should be cleaned up after Close" )
263263}
0 commit comments