protected boolean waitForJobToComplete(String jobName, long waitTime, int jobCompleteCount) {
		Assert.hasText(jobName, "The job name must be specified.");

		boolean isJobComplete = isJobComplete(jobName, jobCompleteCount);
		long timeout = System.currentTimeMillis() + waitTime;
		while (!isJobComplete && System.currentTimeMillis() < timeout) {
			sleepOneSecond();
			isJobComplete = isJobComplete(jobName, jobCompleteCount);
		}
		return isJobComplete;
	}
Waits until the number of "Complete" job executions reaches the jobCompleteCount.

@param jobName          The name of the job to evaluate.
@param jobCompleteCount the number of job executions marked complete to return true.
@param waitTime         The milliseconds that the method should wait for the job execution to complete.
@return True if the number of Complete Jobs is reached before waitTime, else false.
spring-xd-integration-test/src/test/java/org/springframework/xd/integration/test/AbstractJobTest.java