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

Ned Collyer resolved WICKET-1466.
---------------------------------

    Resolution: Duplicate

Duplicate of WICKET-861

> Use of UrlCompressingWebRequestProcessor breaks major functionality in 
> WicketTester.
> ------------------------------------------------------------------------------------
>
>                 Key: WICKET-1466
>                 URL: https://issues.apache.org/jira/browse/WICKET-1466
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.2
>            Reporter: Ned Collyer
>         Attachments: 20080331-test.tar.gz
>
>
> Use of UrlCompressingWebRequestProcessor breaks major functionality in 
> WicketTester.
> Attached is an example quickstart.
> If the tester is instantiated with an application that uses 
> UrlCompressingWebRequestProcessor,
>  
> WicketTester tester = new WicketTester(new MyApplication() { 
>    protected IRequestCycleProcessor newRequestCycleProcessor() {
>         return new UrlCompressingWebRequestProcessor();
>     });
> Then this works
>   tester.startPage(HomePage.class)
>   tester.assertRenderedPage(HomePage.class);
> But this fails with the following stack trace.
>   //start and render the test page
>   tester.startPage(new HomePage());
>   tester.assertRenderedPage(HomePage.class);
> INFO  - RequestListenerInterface   - registered listener interface 
> [RequestListenerInterface name=IActivePageBehaviorListener, method=public 
> abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()]
> ERROR - RequestCycle               - For input string: "testPage"
> java.lang.NumberFormatException: For input string: "testPage"
>       at 
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
>       at java.lang.Integer.parseInt(Integer.java:447)
>       at java.lang.Integer.parseInt(Integer.java:497)
>       at 
> org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressor.getComponentAndInterfaceForUID(UrlCompressor.java:122)
>       at 
> org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressingWebRequestProcessor.resolveListenerInterfaceTarget(UrlCompressingWebRequestProcessor.java:79)
>       at 
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:461)
>       at 
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
>       at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224)
>       at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1330)
>       at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
>       at 
> org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:387)
>       at 
> org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:375)
>       at 
> org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:248)
>       at 
> org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:233)
>       at 
> com.mine.page.HomePageUnitTest.testRenderHomePage(HomePageUnitTest.java:21)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:585)
>       at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>       at 
> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
>       at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>       at 
> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
>       at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>       at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
>       at 
> org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
>       at 
> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
>       at 
> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
>       at 
> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
>       at 
> org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>       at 
> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
>       at 
> com.intellij.rt.junit4.Junit4TestMethodAdapter.run(Junit4TestMethodAdapter.java:49)
>       at junit.textui.TestRunner.doRun(TestRunner.java:116)
>       at 
> com.intellij.rt.execution.junit.IdeaTestRunner.doRun(IdeaTestRunner.java:65)
>       at junit.textui.TestRunner.doRun(TestRunner.java:109)
>       at 
> com.intellij.rt.execution.junit.IdeaTestRunner.startRunnerWithArgs(IdeaTestRunner.java:24)
>       at 
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:118)
>       at 
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
> See http://www.nabble.com/Best-method-of-testing-borders-td16389412.html for 
> more context.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to