// Wait until both of the two jobs are submitted.
List<MRJob> jobs = exec.getJobs();
assertEquals(2, jobs.size());
StopWatch watch = new StopWatch();
watch.start();
int numOfJobsSubmitted = 0;
while (numOfJobsSubmitted < 2 && watch.getTime() < 10000) {
numOfJobsSubmitted = 0;
for (MRJob job : jobs) {
if (job.getJobState() == MRJob.State.RUNNING) {