You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2015/12/11 10:38:11 UTC

[jira] [Commented] (OAK-3765) Parallelized test runner does not wait for test completion

    [ https://issues.apache.org/jira/browse/OAK-3765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15052522#comment-15052522 ] 

Michael Dürig commented on OAK-3765:
------------------------------------

bq. In the attached patch, the finished() method waits indefinitely until all tests are done.

+1 to this behaviour as this makes it clearer where an actual problem is.

Maybe there is a way here to dump stack traces to a log for tests that don't terminate after a given time!?

> Parallelized test runner does not wait for test completion
> ----------------------------------------------------------
>
>                 Key: OAK-3765
>                 URL: https://issues.apache.org/jira/browse/OAK-3765
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>    Affects Versions: 1.2.9, 1.0.25, 1.3.12
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Minor
>
> As analyzed by [~tomek.rekawek] in OAK-3743:
> Quote from the mailing list:
> {quote}
> On a “slow” machine, in the surefire logs for the AtomicCounterTest (which takes 63 sec while it should 3 sec), following test case appears:
> {noformat}
>   <testcase time="2.261" classname="org.apache.jackrabbit.oak.jcr.RepositoryTest" name="importWithRegisteredType[RDBDocumentStore on jdbc:derby:oaktest\;create=true]"/>
> {noformat}
> It’s a test case from a completely different class. I downloaded all the surefire reports and it seems that the test cases from the RepositoryTest class are spread across CRUDTest, ConflictResolutionTest, ObservationTest and others. On the “fast” machines the problem doesn’t exist and all RepositoryTest methods are invoked within their own test case.
> {quote}
> It seems that this behaviour is caused by the {{org.apache.jackrabbit.oak.jcr.Parallelized}} runner, used in the {{AbstractRepositoryTest}}. JUnit submits a {{Runnable}} wrapping all the test cases from a single class to the {{ThreadPoolScheduler#schedule()}} method and then invokes {{#finished()}}. The latter waits for 10 minutes until the submitted {{Runnable}} is done. However, in case of the {{RepositoryTest}}, all tests takes more than 10 minutes. The {{finished()}} method simply returns, JUnit invokes another test class, while the {{RepositoryTest}} is still running in the background.
> In the attached patch, the {{finished()}} method waits indefinitely until all tests are done. It may seem a bit radical, but after all it's the same behaviour as in single-thread JUnit runner, which doesn't have internal timeout as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)