You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2023/01/04 13:58:58 UTC
[Bug 66411] New: JUnitLauncher task fails on forked test timeout even if haltOnFailure is false
https://bz.apache.org/bugzilla/show_bug.cgi?id=66411
Bug ID: 66411
Summary: JUnitLauncher task fails on forked test timeout even
if haltOnFailure is false
Product: Ant
Version: 1.10.12
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Optional Tasks
Assignee: notifications@ant.apache.org
Reporter: tomasz.kowalczewski@gmail.com
Target Milestone: ---
We have been migrating from junit 4 (junit ant task) to junit 5
(junitlauncher).
Where we previously had:
<junit fork="yes" haltonfailure="${junit.haltonfailure}" ...
we have:
<junitlauncher haltonfailure="${junit.haltonfailure}" ...>
<fork timeout="${junit.timeout}"> ...
The fact that this fork works per test suite and not per test was a suprise but
not a deal breaker. However we are executing hundreds of tests in forked JVMs
(Loop in JUnitLauncherTask.java:96) and whenever one fails whole builds goes
belly up insantly.
It seems that the case of exitCode being equal to
Constants.FORK_EXIT_CODE_TIMED_OUT should be threated the same way as when it
equals Constants.FORK_EXIT_CODE_TESTS_FAILED in JUnitLauncherTask.java:301/332.
What are your thoughts?
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 66411] JUnitLauncher task fails on forked test timeout even if haltOnFailure is false
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66411
--- Comment #2 from Tomasz Kowalczewski <to...@gmail.com> ---
Hello. Thanks for quick reply. I have created quick and dirty proof of concept
that seems to work on my computer:
https://github.com/apache/ant/pull/197
On thing that is still different than in junit4 is that tets listeners are not
called (they seem to be called inside forker vm so if it times out and is
killed there is no way for them to execute, I don't (yet) know this worked in
case of junit4).
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 66411] JUnitLauncher task fails on forked test timeout even if haltOnFailure is false
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66411
--- Comment #3 from Tomasz Kowalczewski <to...@gmail.com> ---
Hello,
is there a chance that this feture reqeust will be looked at? I can implement
it if you give me a hint how much change/refactoring you require (or are
willing to accept).
P.S.: PoC is here: https://github.com/apache/ant/pull/197
Thank you!
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 66411] JUnitLauncher task fails on forked test timeout even if haltOnFailure is false
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66411
--- Comment #1 from Jaikiran Pai <ja...@apache.org> ---
Hello Tomasz, most of what junitlauncher does is closely similar to what the
junit task did. This was intentional to keep the behavioural differences to
minimal. I had a quick look at how junit task (in Ant) deals with the
combination of a timed out test plus haltonfailure = false and it looks like it
doesn't halt the build, unlike what the junitlauncher currently does.
So what you suggest might be a valid change to do. I haven't fully thought of
whether that will cause some other issues, but I think it certainly is
something that is worth changing.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 66411] JUnitLauncher task fails on forked test timeout even if haltOnFailure is false
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66411
Jaikiran Pai <ja...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |1.10.14
--
You are receiving this mail because:
You are the assignee for the bug.