You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using JUnit to grade coding exams. Students get points for each passing test, so it's important to me that failures from a single test are isolated - I don't want students' mistakes in one part of the code to affect other tests and cause them to lose more points than they should. Such mistakes sometimes include infinite loops in their code, meaning I need timeouts. And sometimes mistakes include printing text to stdout within an infinite loop...
I'm using JUnit to grade coding exams. Students get points for each passing test, so it's important to me that failures from a single test are isolated - I don't want students' mistakes in one part of the code to affect other tests and cause them to lose more points than they should. Such mistakes sometimes include infinite loops in their code, meaning I need timeouts. And sometimes mistakes include printing text to stdout within an infinite loop...
Steps to reproduce
Run the following test:
The test hangs, despite the timeout.
Context
On Ubuntu 18.04.3, using Gradle 6.0.1 (latest as of this report) and the following build.gradle:
I run tests with
./gradlew build
.Note that replacing the
while(true)
loop above withThread.sleep(60 * 1000)
causes the test to fail with aTimeoutException
, as expected.Deliverables
@Timeout
work even when the test prints infinite output to stdoutThe text was updated successfully, but these errors were encountered: