@@ -48,6 +48,7 @@ @interface BPTMDRunnerConnection()<XCTMessagingChannel_DaemonToIDE, XCTMessaging
48
48
49
49
@property (nonatomic , weak ) id <BPTestBundleConnectionDelegate> interface;
50
50
@property (nonatomic , assign ) BOOL connected;
51
+ @property (nonatomic , assign ) BOOL testBundleReady;
51
52
@property (nonatomic , strong ) dispatch_queue_t queue;
52
53
@property (nonatomic , strong ) NSString *bundleID;
53
54
@property (nonatomic , assign ) pid_t appProcessPID;
@@ -76,11 +77,14 @@ - (void)connectWithTimeout:(NSTimeInterval)timeout {
76
77
77
78
// Pool connection status till it passes.
78
79
[BPUtils runWithTimeOut: timeout until: ^BOOL {
79
- return self.connected ;
80
+ return self.connected && self. testBundleReady ;
80
81
}];
81
82
if (!self.connected ) {
82
83
[BPUtils printInfo: ERROR withString: @" Timeout establishing a runner session!" ];
83
84
}
85
+ if (!self.testBundleReady ) {
86
+ [BPUtils printInfo: ERROR withString: @" Timeout connecting to the test bundle!" ];
87
+ }
84
88
}
85
89
86
90
- (void )connect {
@@ -279,12 +283,14 @@ - (id)_XCT_didBeginExecutingTestPlan {
279
283
280
284
- (id )_XCT_testBundleReadyWithProtocolVersion : (NSNumber *)protocolVersion minimumVersion : (NSNumber *)minimumVersion {
281
285
self.connected = YES ;
286
+ self.testBundleReady = YES ;
282
287
[BPUtils printInfo: INFO withString: @" Test bundle is connected. ProtocolVersion= %@ , minimumVersion = %@ " , protocolVersion, minimumVersion];
283
288
return nil ;
284
289
}
285
290
286
291
- (id )_XCT_testRunnerReadyWithCapabilities : (XCTCapabilities *)capabilities {
287
292
self.connected = YES ;
293
+ self.testBundleReady = YES ;
288
294
[BPUtils printInfo: INFO withString: @" Test bundle is connected. Capabilities = %@ " , capabilities];
289
295
return nil ;
290
296
}
0 commit comments