ah.

well, i have a fix. we just recreate the session and request cycle the second time it's used in the mock application code:

           wicketSession = getSession(servletRequest);
           new WebRequestCycle(wicketSession, wicketRequest,
                   wicketResponse).request();

request cycle objects were never designed to be reused in this way and such usage should not be supported... so i'm not particularly inclined to track down the problem further.

     jon

Jonathan Locke wrote:


one of the unit tests remains broken. the problem seems to be stemming from MockWebApplication
(although the problem could be stemming from some other area). anyway, i took a look at it, but
i don't really understand what the code below (from MockWebApplication) is supposed to do. the problem occurs where the arrow is below. does anyone have any clues?


      jon

/**
* Create and process the request cycle using the current request and
* response information.
*
* @throws ServletException
* If the render cycle fails
*/
public void processRequestCycle() throws ServletException
{
WebRequestCycle cycle = new WebRequestCycle(wicketSession, wicketRequest,
wicketResponse);
cycle.request();
// handle redirects which are usually managed by the browser transparently
final MockHttpServletResponse httpResponse =
(MockHttpServletResponse)cycle.getWebResponse().getHttpServletResponse();
if (httpResponse.isRedirect())
{
lastRenderedPage = cycle.getResponsePage();
final MockHttpServletRequest httpRequest =
(MockHttpServletRequest)cycle.getWebRequest().getHttpServletRequest();
httpRequest.setRequestToRedirectString(httpResponse.getRedirectLocation());


--->            cycle.request();
       }
       lastRenderedPage = cycle.getResponsePage();
   }



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to