Skip to content

Commit 33eea9c

Browse files
author
Keqiu Hu
authored
Merge pull request #107 from linkedin/fix_infinite_retry
Fix If there is an error launching the app and tests, new simulators …
2 parents 22fa141 + e444eb0 commit 33eea9c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Bluepill-cli/Bluepill-cli/Bluepill/Bluepill.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,11 @@ - (void)setupExecutionWithContext:(BPExecutionContext *)context {
197197

198198
context.runner = [self createSimulatorRunnerWithContext:context];
199199

200+
// Set up retry counts.
200201
self.maxCreateTries = [self.config.maxCreateTries integerValue];
202+
self.maxInstallTries = [self.config.maxInstallTries integerValue];
203+
self.maxLaunchTries = [self.config.maxLaunchTries integerValue];
204+
201205
NEXT([self createSimulatorWithContext:context]);
202206
}
203207

@@ -249,7 +253,6 @@ - (void)createSimulatorWithContext:(BPExecutionContext *)context {
249253
[BPUtils printInfo:ERROR withString:[@"Timeout: " stringByAppendingString:stepName]];
250254
};
251255

252-
self.maxInstallTries = [self.config.maxInstallTries integerValue];
253256
[context.runner createSimulatorWithDeviceName:deviceName completion:handler.defaultHandlerBlock];
254257
}
255258

@@ -258,8 +261,6 @@ - (void)installApplicationWithContext:(BPExecutionContext *)context {
258261
[[BPStats sharedStats] startTimer:stepName];
259262
[BPUtils printInfo:INFO withString:stepName];
260263

261-
self.maxLaunchTries = [self.config.maxLaunchTries integerValue];
262-
263264
NSError *error = nil;
264265
BOOL success = [context.runner installApplicationAndReturnError:&error];
265266

0 commit comments

Comments
 (0)