Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e49a10907febb25327b0870245e945ec6c77dfc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package org.eclipse.linuxtools.internal.gcov.test;

import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.waits.ICondition;

public class JobsRunning implements ICondition {

	private final Object family;
	
	public JobsRunning(Object family) {
		this.family = family;
	}
	
	@Override
	public boolean test() {
		Job[] allJobs = Job.getJobManager().find(family);
		return allJobs.length == 0;
	}
	
	@Override
	public void init(SWTBot bot) {
		
	}
	
	@Override
	public String getFailureMessage() {
		return "Jobs still running...";
	}
}

Back to the top