@@ -69,30 +69,41 @@ - (void)testConnectivityRepresentations
6969
7070- (void )testMultipleReachabilityObservers
7171{
72+ NSLog (@" [Sentry] [TEST] creating observer A" );
7273 TestSentryReachabilityObserver *observerA = [[TestSentryReachabilityObserver alloc ] init ];
74+ NSLog (@" [Sentry] [TEST] adding observer A as reachability observer" );
7375 [self .reachability addObserver: observerA];
7476
77+ NSLog (@" [Sentry] [TEST] throwaway reachability callback, setting to reachable" );
7578 SentryConnectivityCallback (self.reachability .sentry_reachability_ref ,
7679 kSCNetworkReachabilityFlagsReachable , nil ); // ignored, as it's the first callback
80+ NSLog (@" [Sentry] [TEST] reachability callback to set to intervention required" );
7781 SentryConnectivityCallback (self.reachability .sentry_reachability_ref ,
7882 kSCNetworkReachabilityFlagsInterventionRequired , nil );
7983
84+ NSLog (@" [Sentry] [TEST] creating observer B" );
8085 TestSentryReachabilityObserver *observerB = [[TestSentryReachabilityObserver alloc ] init ];
86+ NSLog (@" [Sentry] [TEST] adding observer B as reachability observer" );
8187 [self .reachability addObserver: observerB];
8288
89+ NSLog (@" [Sentry] [TEST] reachability callback to set to back to reachable" );
8390 SentryConnectivityCallback (
8491 self.reachability .sentry_reachability_ref , kSCNetworkReachabilityFlagsReachable , nil );
92+ NSLog (@" [Sentry] [TEST] reachability callback to set to back to intervention required" );
8593 SentryConnectivityCallback (self.reachability .sentry_reachability_ref ,
8694 kSCNetworkReachabilityFlagsInterventionRequired , nil );
8795
96+ NSLog (@" [Sentry] [TEST] removing observer B as reachability observer" );
8897 [self .reachability removeObserver: observerB];
8998
99+ NSLog (@" [Sentry] [TEST] reachability callback to set to back to reachable" );
90100 SentryConnectivityCallback (
91101 self.reachability .sentry_reachability_ref , kSCNetworkReachabilityFlagsReachable , nil );
92102
93103 XCTAssertEqual (5 , observerA.connectivityChangedInvocations );
94104 XCTAssertEqual (2 , observerB.connectivityChangedInvocations );
95105
106+ NSLog (@" [Sentry] [TEST] removing observer A as reachability observer" );
96107 [self .reachability removeObserver: observerA];
97108}
98109
0 commit comments