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
Hanging tests duplicates are not minimized.
There are two identical tests: one generated by Fuzzing, one by Symbolic engine (when default or some custom mode is used).
One test on timeout should be present in the resulting test class.
Actual behavior
There are two identical tests in the test class.
Visual proofs (screenshots, logs, images)
///region SYMBOLIC EXECUTION: TIMEOUTS for method sleep()/** * @utbot.classUnderTest {@link TimeoutTest} * @utbot.methodUnderTest {@link TimeoutTest#sleep()} * @utbot.invokes {@link Thread#sleep(long)} */@Test@DisplayName("sleep: -> TimeoutExceeded")
@org.junit.jupiter.api.Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)
publicvoidtestSleep_ThreadSleep() throwsInterruptedException {
TimeoutTesttimeoutTest = newTimeoutTest();
/* This execution may take longer than the 1000 ms timeout and therefore fail due to exceeding the timeout. */assertTimeoutPreemptively(Duration.ofMillis(1000L), () -> timeoutTest.sleep());
}
///endregion///region FUZZER: TIMEOUTS for method sleep()/** * @utbot.classUnderTest {@link TimeoutTest} * @utbot.methodUnderTest {@link TimeoutTest#sleep()} */@Test@DisplayName("sleep: ")
@org.junit.jupiter.api.Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)
publicvoidtestSleep() throwsInterruptedException {
TimeoutTesttimeoutTest = newTimeoutTest();
/* This execution may take longer than the 1000 ms timeout and therefore fail due to exceeding the timeout. */assertTimeoutPreemptively(Duration.ofMillis(1000L), () -> timeoutTest.sleep());
}
///endregion
Environment
IntelliJ IDEA 2022.3 / 2023.1
The text was updated successfully, but these errors were encountered:
Another illustration of timed out tests minimization:
Generate tests by fuzzer for org.utbot.examples.exceptions.ExceptionExamples#hangForSeconds method
There are dozens (~30-40) of similar tests. Some of them completely the same, for instance for corner cases:
@Test@DisplayName("hangForSeconds: seconds = max")
@org.junit.jupiter.api.Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)
publicvoidtestHangForSecondsWithCornerCase4() throwsInterruptedException {
ExceptionExamplesexceptionExamples = newExceptionExamples();
/* This execution may take longer than the 1000 ms timeout and therefore fail due to exceeding the timeout. */assertTimeoutPreemptively(Duration.ofMillis(1000L), () -> exceptionExamples.hangForSeconds(Integer.MAX_VALUE));
}
@Test@DisplayName("hangForSeconds: seconds = max")
@org.junit.jupiter.api.Timeout(value = 1000L, unit = TimeUnit.MILLISECONDS)
publicvoidtestHangForSecondsWithCornerCase5() throwsInterruptedException {
ExceptionExamplesexceptionExamples = newExceptionExamples();
/* This execution may take longer than the 1000 ms timeout and therefore fail due to exceeding the timeout. */assertTimeoutPreemptively(Duration.ofMillis(1000L), () -> exceptionExamples.hangForSeconds(Integer.MAX_VALUE));
}
Description
Hanging tests duplicates are not minimized.
There are two identical tests: one generated by Fuzzing, one by Symbolic engine (when default or some custom mode is used).
To Reproduce
Expected behavior
One test on timeout should be present in the resulting test class.
Actual behavior
There are two identical tests in the test class.
Visual proofs (screenshots, logs, images)
Environment
IntelliJ IDEA 2022.3 / 2023.1
The text was updated successfully, but these errors were encountered: