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

Juan Pablo Santos Rodríguez commented on JSPWIKI-799:
-----------------------------------------------------

Finally, I've been able to reproduce the error, it's a matter of tests not 
being order-independent. Stripping latest output of the failing tests from the 
console build:

{code}
SearchManagerTest.waitForIndex for testTitleSearch2 sleeping 0 (out of 50)
page: WikiPage [JSPWiki:.testpage_,ver=-1,mod=Tue Aug 06 08:56:29 UTC 2013]
page: WikiPage [JSPWiki:testpage,ver=-1,mod=Tue Aug 06 08:56:31 UTC 2013]
page: WikiPage [JSPWiki:TestPage,ver=-1,mod=Tue Aug 06 08:56:33 UTC 2013]

SearchManagerTest.waitForIndex for testTitleSearch sleeping 0 (out of 50)
page: WikiPage [JSPWiki:PluralPages,ver=-1,mod=Tue Aug 06 08:56:29 UTC 2013]
snippet: This is a <span class="searchmatch">test</span>.

page: WikiPage [JSPWiki:.testpage_,ver=-1,mod=Tue Aug 06 08:56:29 UTC 2013]
snippet: &lt;<span class="searchmatch">test</span>&gt;

page: WikiPage [JSPWiki:TestPage,ver=-1,mod=Tue Aug 06 08:56:37 UTC 2013]
SearchManagerTest.waitForIndex for testSimpleSearch2 sleeping 0 (out of 50)
[...] 
{code}

There are some strange page results returned by Lucene:
* {{.testpage_}} appears on both {{testTitleSearch}} and {{testTitleSearch2}}. 
This WikiPage is created on JSPWikiMarkupParserTest
* {{testpage}} appears on {{testTitleSearch2}}. This WikiPage is created on 
JSPWikiMarkupParserTest
* {{PluralPages}} appears on {{testTitleSearch}}. This WikiPage is created on 
CommandResolverTest

Within Eclipse, if CommandResolverTest is run and then afterwards 
SearchManagerTest, {{testTitleSearch}} fails. As both tests use the same 
{{jspwiki.fileSystemProvider.pageDir}}, WikiPages from CommandResolverTest (and 
JSPWikiMarkupParserTest) also get indexed by Lucene, causing the failures. I'm 
commiting a fix for that with some other tweaks for LuceneSearchProvider
                
> 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