Attempt to fix failin test cases.
This commit is contained in:
@@ -44,6 +44,15 @@ import junit.framework.AssertionFailedError;
|
||||
*/
|
||||
public abstract class ACondition {
|
||||
|
||||
private static boolean headless;
|
||||
static {
|
||||
try {
|
||||
Display.getDefault();
|
||||
headless = false;
|
||||
} catch (Exception e) {
|
||||
headless = true;
|
||||
}
|
||||
}
|
||||
private String description = null;
|
||||
|
||||
/**
|
||||
@@ -240,7 +249,7 @@ public abstract class ACondition {
|
||||
}
|
||||
|
||||
public static boolean inUIThread() {
|
||||
return Display.getDefault().getThread() == Thread.currentThread();
|
||||
return !headless && Display.getDefault().getThread() == Thread.currentThread();
|
||||
}
|
||||
|
||||
public static StringBuffer getStackDumps() {
|
||||
|
||||
Reference in New Issue
Block a user