You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "W.Mazur (JIRA)" <ji...@apache.org> on 2012/08/16 11:15:37 UTC
[jira] [Updated] (WICKET-4712) WicketTester: application cannot be
reused with new tester
[ https://issues.apache.org/jira/browse/WICKET-4712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
W.Mazur updated WICKET-4712:
----------------------------
Attachment: myproject.zip
Quick Start Attached - run TestHomePage as JUnit
> WicketTester: application cannot be reused with new tester
> ----------------------------------------------------------
>
> Key: WICKET-4712
> URL: https://issues.apache.org/jira/browse/WICKET-4712
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.6
> Environment: N/A
> Reporter: W.Mazur
> Priority: Trivial
> Labels: test
> Attachments: myproject.zip
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Rationale: it takes some time to start my application, so I want to create one instance of application and reuse it in various tests. It's not possible - At this moment I have to create new app instance for each wicket tester.
> Reproduction:
> Get Quick start, create app (private static WicketApplication app = new WicketApplication();), change SetUp() Method to: tester = new WicketTester(app); Second test will fail with Illegal State Exception: "Application name can only be set once."
> Root Cause:
> BaseWicketTester, constructor, line 293: application.setName("WicketTesterApplication-" + UUID.randomUUID());
> Proposed fix:
> if(application.getName() == null)
> application.setName("WicketTesterApplication-" + UUID.randomUUID());
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira