[
https://issues.apache.org/jira/browse/WICKET-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Juergen Donnerstag resolved WICKET-2501.
----------------------------------------
Resolution: Fixed
Fix Version/s: 1.4.3
Assignee: Juergen Donnerstag
thanks
> BaseWicketTester clickLink calls onBeginRequest two times.
> ----------------------------------------------------------
>
> Key: WICKET-2501
> URL: https://issues.apache.org/jira/browse/WICKET-2501
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.1
> Environment: java 6, ubuntu 9.10
> Reporter: Daniele
> Assignee: Juergen Donnerstag
> Priority: Minor
> Fix For: 1.4.3
>
>
> Whilte testing a page using BaseWicketTester.clickLink, it results in calling
> two times the RequestCycle onBeginRequest.
> Is this correct? This cause a problem to me cause in onBeginRequest I open DB
> transaction as per Open Session in View pattern. So transaction is opened a
> second time before being committed.
> first time, line 697
> callOnBeginRequest(requestCycle);
> second time, line 704
> processRequestCycle(requestCycle);
> also call onBeginRequest as you see in the stack:
> Thread [main] (Suspended (breakpoint at line 24 in SessionManager))
> SessionManager.start() line: 24
> DataRequestCycle.onBeginRequest() line: 26
> DataRequestCycle(RequestCycle).prepare() line: 1240
> DataRequestCycle(RequestCycle).step() line: 1304
> DataRequestCycle(RequestCycle).steps() line: 1428
> DataRequestCycle(RequestCycle).request() line: 545
> WicketTester(MockWebApplication).processRequestCycle(WebRequestCycle)
> line: 504
> WicketTester(BaseWicketTester).clickLink(String, boolean) line: 704
> WicketTester(BaseWicketTester).clickLink(String) line: 649
> EditPageTest.addProducts() line: 50
> NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
> available [native method]
> NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
> DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
> Method.invoke(Object, Object...) line: 597
> TestMethod.invoke(Object) line: 59
> MethodRoadie.runTestMethod() line: 98
> MethodRoadie$2.run() line: 79
> MethodRoadie.runBeforesThenTestThenAfters(Runnable) line: 87
> MethodRoadie.runTest() line: 77
> MethodRoadie.run() line: 42
> JUnit4ClassRunner.invokeTestMethod(Method, RunNotifier) line: 88
> JUnit4ClassRunner.runMethods(RunNotifier) line: 51
> JUnit4ClassRunner$1.run() line: 44
> ClassRoadie.runUnprotected() line: 27
> ClassRoadie.runProtected() line: 37
> JUnit4ClassRunner.run(RunNotifier) line: 42
> JUnit4TestMethodReference(JUnit4TestReference).run(TestExecution) line:
> 46
> TestExecution.run(ITestReference[]) line: 38
> RemoteTestRunner.runTests(String[], String, TestExecution) line: 467
> RemoteTestRunner.runTests(TestExecution) line: 683
> RemoteTestRunner.run() line: 390
> RemoteTestRunner.main(String[]) line: 197
> --
> Daniele Dellafiore
> http://blog.ildella.net
> http://twitter.com/ildella
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.