Skip to content

Commit

Permalink
Merge pull request #107 from linkedin/fix_infinite_retry
Browse files Browse the repository at this point in the history
Fix If there is an error launching the app and tests, new simulators …
  • Loading branch information
oliverhu authored Mar 17, 2017
2 parents 22fa141 + e444eb0 commit 33eea9c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Bluepill-cli/Bluepill-cli/Bluepill/Bluepill.m
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ - (void)setupExecutionWithContext:(BPExecutionContext *)context {

context.runner = [self createSimulatorRunnerWithContext:context];

// Set up retry counts.
self.maxCreateTries = [self.config.maxCreateTries integerValue];
self.maxInstallTries = [self.config.maxInstallTries integerValue];
self.maxLaunchTries = [self.config.maxLaunchTries integerValue];

NEXT([self createSimulatorWithContext:context]);
}

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

self.maxInstallTries = [self.config.maxInstallTries integerValue];
[context.runner createSimulatorWithDeviceName:deviceName completion:handler.defaultHandlerBlock];
}

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

self.maxLaunchTries = [self.config.maxLaunchTries integerValue];

NSError *error = nil;
BOOL success = [context.runner installApplicationAndReturnError:&error];

Expand Down

0 comments on commit 33eea9c

Please sign in to comment.