mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
stoppable endless tests on linux, 2nd attempt
This commit is contained in:
@@ -130,19 +130,19 @@ public class ShutDownTracker implements Runnable {
|
||||
return list.isEmpty()? null : list.removeLast();
|
||||
}
|
||||
|
||||
public static void invokeAndWait(boolean timed, Runnable runnable) {
|
||||
public static void invokeAndWait(boolean timed, final Runnable runnable) {
|
||||
if (timed) {
|
||||
final Semaphore semaphore = new Semaphore();
|
||||
semaphore.down();
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
runnable.run();
|
||||
semaphore.up();
|
||||
}
|
||||
});
|
||||
if (!semaphore.waitFor(1000)) {
|
||||
return;
|
||||
}
|
||||
semaphore.waitFor(1000);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user