Skip to content

Commit

Permalink
Test fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
nbauernfeind committed Mar 5, 2024
1 parent 2a7b16e commit 6311090
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,7 @@ private boolean maybeCreateClassHelper2(
// This source actually succeeded in compiling, but was not written because some other source
// failed to compile. Let's schedule this work to try again.
toRetry.add(request);
return;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,24 +299,15 @@ public void testMultiCompileWithFailure() throws ExecutionException, Interrupted
CompletionStageFutureImpl.make(),
};

Exception firstErr;
try {
ExecutionContext.getContext().getQueryCompiler().compile(requests, resolvers);
// noinspection DataFlowIssue
throw Assert.statementNeverExecuted();
} catch (Exception err) {
firstErr = err;
} catch (Exception ignored) {
}

Assert.eqTrue(resolvers[0].getFuture().isDone(), "resolvers[0].getFuture().isDone()");
Assert.eqTrue(resolvers[1].getFuture().isDone(), "resolvers[0].getFuture().isDone()");
Assert.neqNull(resolvers[1].getFuture().get(), "resolvers[1].getFuture().get()");
try {
resolvers[0].getFuture().get();
// noinspection DataFlowIssue
throw Assert.statementNeverExecuted();
} catch (ExecutionException err) {
Assert.eq(firstErr, "firstErr", err.getCause(), "err");
}
}
}

0 comments on commit 6311090

Please sign in to comment.