Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve isolated process error handling #130

Closed
andre15silva opened this issue Jan 24, 2022 · 0 comments · Fixed by #131
Closed

Improve isolated process error handling #130

andre15silva opened this issue Jan 24, 2022 · 0 comments · Fixed by #131

Comments

@andre15silva
Copy link
Contributor

The current error logging of OOM errors from the isolated test running process is not great, and can result in misleading errors such as java.lang.RuntimeException: java.nio.file.NoSuchFileException: CoveredTestResultPerTest.dat (ASSERT-KTH/flacoco#121)

For that we probably need to change the way we check if the process exited successfully here:

long startTime = System.currentTimeMillis();
boolean finished = process.waitFor(timeoutInMs, TimeUnit.MILLISECONDS);
long endTime = System.currentTimeMillis();
if (!finished) {
throw new RuntimeException("Forked process did not finish correctly. " +
"Timeout set was " + timeoutInMs + " ms, " +
"process took " + (endTime - startTime) + " ms before ending.");
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant