manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shinichiro Abe (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CONNECTORS-1231) Upgrade to JUnit 4.12
Date Tue, 15 Sep 2015 10:41:45 GMT

     [ https://issues.apache.org/jira/browse/CONNECTORS-1231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Shinichiro Abe updated CONNECTORS-1231:
---------------------------------------
    Attachment: CONNECTORS-1231.patch

Updated patch.

I had been hitting timeout errors sometimes for a few weeks when testing by maven after upgrading
to 2.14. 
The test failed in the 1st time but passed in the 2nd time, or the test failed on another
machine but passed on my machine.

a sample error I got:
{noformat}
Tests in error: 
  sessionCrawl(org.apache.manifoldcf.crawler.connectors.webcrawler.tests.SessionLoginHSQLDBIT):
ManifoldCF did not terminate in the allotted time of 600000 milliseconds
{noformat}

Apparently those were caused by forkMode-related params in surefire plugin configs.

{noformat}
[WARNING] The parameter forkMode is deprecated since 2.14. Use forkCount and reuseForks instead.
{noformat}

In JUnit 2.14, reuseForks default is true that means to reuse the processes to execute the
next tests.
In MCF POMs, there are forkMode=always that means reuseForks param could be false according
to [1]: 

And maven-failsafe-plugin can support reuseForks param since 2.13[2], but the current version
is 2.12.3.

I've replaced forkMode with forkCount and reuseForks, and upgraded the failsafe version in
this patch.

Also we may have to put junit-4.12.jar in ANT_HOME/lib when ant test runs.

All tests(mvn clean install, ant test, ant uitest) can pass without the warning now,
but I'm afraid the tests may fail in someone else's machine.


[1] https://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html
[2] https://maven.apache.org/components/surefire/maven-failsafe-plugin/integration-test-mojo.html

> Upgrade to JUnit 4.12
> ---------------------
>
>                 Key: CONNECTORS-1231
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1231
>             Project: ManifoldCF
>          Issue Type: Test
>          Components: Tests
>    Affects Versions: ManifoldCF 2.3
>            Reporter: Shinichiro Abe
>            Assignee: Shinichiro Abe
>            Priority: Minor
>             Fix For: ManifoldCF 2.3
>
>         Attachments: CONNECTORS-1231.patch, CONNECTORS-1231.patch
>
>
> Background: dev mail thread [link|http://mail-archives.apache.org/mod_mbox/manifoldcf-dev/201508.mbox/%3CCA%2BeTv_XTcU3bRTdS2GTi3apQCkJrzhnbS8oUZkcan%2BiW5goN8A%40mail.gmail.com%3E].



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

Mime
View raw message