// after a blocking task are executed after
// the blocking task has finished
final Semaphore s = new Semaphore(0);
final Semaphore blocking = new Semaphore(0);
ITask basicTaskBeforeBlocking = new AbstractTask() {
@Override
public void task() {
try {
Thread.sleep(RUNTIME);
} catch (final InterruptedException e) {
assertQueue.add(new FailRunnable(e));
}
}
@Override
protected void cancelTask() {
}
};
ITask blockingTask = new AbstractTask() {
@Override
public void task() {
try {
Thread.sleep(RUNTIME);
blocking.release();
} catch (final InterruptedException e) {
assertQueue.add(new FailRunnable(e));
}
}
@Override
public boolean isBlocking() {
return true;
}
@Override
protected void cancelTask() {
}
};
ITask basicTaskAfterBlocking = new AbstractTask() {
@Override
public void task() {
// check whether blocking task already finished
try {