Skip to content

Commit

Permalink
Merge pull request #2 from Azure/dev
Browse files Browse the repository at this point in the history
update my fork
  • Loading branch information
xuezhai committed May 30, 2014
2 parents b4acd81 + 9c7218f commit 48a5aba
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,17 @@ public void createJobWithNotificationSuccess() throws ServiceException {
JobInfo actualJob = service.create(creator);

// Assert
JobInfo pendingJobInfo = service.get(Job.get(actualJob.getId()));
int retryCounter = 0;
while (pendingJobInfo.getState() != JobState.Error
&& retryCounter < 100) {
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
}
pendingJobInfo = service.get(Job.get(actualJob.getId()));
retryCounter++;
}
verifyJobProperties("actualJob", name, priority, duration, state,
templateId, created, lastModified, stateTime, endTime, 1,
actualJob);
Expand Down Expand Up @@ -340,7 +351,7 @@ public void deleteJobSuccess() throws ServiceException,
JobInfo cancellingJobInfo = service.get(Job.get(jobInfo.getId()));
int retryCounter = 0;
while (cancellingJobInfo.getState() == JobState.Canceling
&& retryCounter < 10) {
&& retryCounter < 100) {
Thread.sleep(2000);
cancellingJobInfo = service.get(Job.get(jobInfo.getId()));
retryCounter++;
Expand Down

0 comments on commit 48a5aba

Please sign in to comment.