Skip to content

Commit

Permalink
[GR-43473] Improve the test reliability.
Browse files Browse the repository at this point in the history
PullRequest: graal/13531
  • Loading branch information
entlicher committed Jan 18, 2023
2 parents 7f1c621 + 0d472b9 commit c31626c
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.function.Consumer;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -95,13 +93,11 @@ Context getContext() {
public void finish() throws IOException {
if (!lastValue.isDone()) {
try {
lastValue.get(1, TimeUnit.SECONDS);
} catch (TimeoutException ex) {
if (handler.getInputStream().available() > 0) {
Assert.fail("Additional message available: " + getMessage());
}
Assert.fail("Last eval(...) has not finished yet");
} catch (InterruptedException | ExecutionException ex) {
lastValue.get();
} catch (InterruptedException ex) {
throw new AssertionError("Last eval(...) has not finished yet", ex);
} catch (ExecutionException ex) {
// Guest language execution failed
}
}
if (handler.getInputStream().available() > 0) {
Expand Down

0 comments on commit c31626c

Please sign in to comment.