You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Winters <cw...@optiron.com> on 2002/11/12 20:47:33 UTC

StrutsTestCase and sessions

Working with StrutsTestCase 1.9 I found what seems like a discrepancy
between the docs and implementation. In HttpSessionSimulator the class
docs say:

  This class simulates an HttpSession object. You can actually
  work with sessions. The simulation is done using a static
  session object inside HttpServletRequest.

However, the implementation of HttpServletRequestSimulator has 'session'
as an instance variable rather than a static variable. As a result the
session gets recreated with every test which kind of defeats the
purpose.

Changing the variable to static makes my tests happy. I don't see any
ill side effects, but that doesn't mean they aren't there. So is this
just a bug or have I overlooked something obvious?

Apologies if this isn't the correct forum.

Chris

-- 
Chris Winters (cwinters@optiron.com)
Java Developer


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>