You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2010/11/19 01:57:13 UTC
[jira] Commented: (WICKET-3178) Correctness of tests is order
dependent, ThreadContext.detach not always called
[ https://issues.apache.org/jira/browse/WICKET-3178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933641#action_12933641 ]
Hudson commented on WICKET-3178:
--------------------------------
Integrated in Apache Wicket 1.5.x #527 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/527/])
detach
Issue: WICKET-3178
> Correctness of tests is order dependent, ThreadContext.detach not always called
> -------------------------------------------------------------------------------
>
> Key: WICKET-3178
> URL: https://issues.apache.org/jira/browse/WICKET-3178
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-M3
> Environment: My own build env which uses Ant.
> Reporter: Richard Emberson
> Assignee: Igor Vaynberg
> Fix For: 1.5-M4
>
>
> I have my own build/test env for Wicket and the order in which tests are
> executed are not necessarily the same as the order that Maven drives
> the tests in the standard test env.
> If you can manage to run only the tests
> org.apache.wicket.request.cycle.RequestCycleListenerTest testBasicOperations
> followed by test
> org.apache.wicket.request.mapper.BasicResourceReferenceMapperTest testDecode1
> the BasicResourceReferenceMapperTest test will fail because it
> requires that the ThreadContext have NO application, but the
> RequestCycleListenerTest does not have a tearDown method
> that calls ThreadContext.detach (nor does it use the BaseWicketTester
> with its tearDown method) so it leaves an application in the ThreadContext.
> Also, BasicResourceReferenceMapperTest does not use the
> BaseWicketTester which calls detach in its constructor.
> The solution is to add the following to BasicResourceReferenceMapperTest
> protected void setUp() { org.apache.wicket.ThreadContext.detach(); }
> In my test env it is simply two lines in a property file to have only the above
> two tests execute (and in the order specified). Don't know how to do that in
> Maven.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.