barrier.await();
// Wait a couple of millis such that the other thread can start query execution
Thread.sleep(MAIN_SLEEP_MILLIS);
query.cancelAll();
if (!isQueryCancelSupported()) {
fail(ASSERTION_FAILED,
"Query.cancel should throw a JDOQueryInterruptedException, " +
"if query canceling is not supported ");
}