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

Brian Burch reopened JSPWIKI-813:
---------------------------------


When this unit test class is executed on its own, rather than as part of the 
entire test collection, log4j emits the dreaded "No appenders could be found" 
messages for net.sf.ehcache.config.ConfigurationFactory.

This is because the unit test class setUp method calls 
CacheManager.getInstance() before the WikiEngine has been instantiated. The 
singleton CacheManager instance later becomes used by the WikiEngine, rather 
than it having the opportunity to setup the root logger using its own testing 
properties.

This simple fix achieves the same objective of clearing the cache prior to the 
start of each test case, but by making the call in the tearDown method the 
CacheManager instance called will be properly created by the TestEngine and the 
WARN messages are no longer emitted.

> ReferenceManagerTest - two cases fail
> -------------------------------------
>
>                 Key: JSPWIKI-813
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-813
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Unit Testing
>    Affects Versions: 2.10
>         Environment: linux low-latency kernel and openjdk quad-core processor 
> (tests run ok on dual-core generic kernel)
>            Reporter: Brian Burch
>            Priority: Minor
>              Labels: patch
>             Fix For: 2.10.1
>
>         Attachments: JSPWIKI-813-patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> testUpdateBothExist fails NPE, and testSelf fails InternalWikiException, both 
> in tearDown(). Seems to be a timing bug related to files created during other 
> tests not being cleared out properly.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to