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

Glen Mazza commented on JSPWIKI-799:
------------------------------------

Hi Harry, our Jenkins build uses JDK 1.6 (which is correct IMO), but most of us 
devs are probably on JDK 1.7 (yourself?) -- it could be that JUnit runs the 
tests in different order between the two JDKs (or even the two OSs) and our 
tests are incorrectly assuming either (a) the order the JUnit test classes are 
being run (ordering can be hardcoded via a TestSuite: 
http://stackoverflow.com/questions/457276/junit4-test-suites/457291#457291) or 
(b) (more likely here) the order that the individual tests within a single test 
class are being run.  Question: if those tests in SearchManagerTest are run in 
any order, should they all still pass regardless, or there are tests 
incorrectly assume the one before it was just run and the one after it was not 
run yet?
                
> jenkins build fails because of SearchManagerTest
> ------------------------------------------------
>
>                 Key: JSPWIKI-799
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-799
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Core & storage
>    Affects Versions: 2.10
>         Environment: Apache Jenkins buildserver
> JSPWiki 2.10
>            Reporter: Harry Metske
>            Assignee: Harry Metske
>            Priority: Minor
>
> After each SVN commit a new Jenkins build is triggered.
> The build on and off succeeds and fails for two testcases :
> {noformat}
> testTitleSearch2(org.apache.wiki.search.SearchManagerTest)  Time elapsed: 
> 1.168 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: no pages expected:<1> but was:<3>
>         at junit.framework.Assert.fail(Assert.java:57)
>         at junit.framework.Assert.failNotEquals(Assert.java:329)
>         at junit.framework.Assert.assertEquals(Assert.java:78)
>         at junit.framework.Assert.assertEquals(Assert.java:234)
>         at junit.framework.TestCase.assertEquals(TestCase.java:401)
>         at 
> org.apache.wiki.search.SearchManagerTest.testTitleSearch2(SearchManagerTest.java:182)
> testTitleSearch(org.apache.wiki.search.SearchManagerTest)  Time elapsed: 
> 0.221 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: no pages expected:<1> but was:<3>
>         at junit.framework.Assert.fail(Assert.java:57)
>         at junit.framework.Assert.failNotEquals(Assert.java:329)
>         at junit.framework.Assert.assertEquals(Assert.java:78)
>         at junit.framework.Assert.assertEquals(Assert.java:234)
>         at junit.framework.TestCase.assertEquals(TestCase.java:401)
>         at 
> org.apache.wiki.search.SearchManagerTest.testTitleSearch(SearchManagerTest.java:165)
> {noformat}
> This must be due to environmental issues.
> On my own laptop these tests never fail.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to