You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Vincent Massol <vm...@octo.com> on 2002/07/12 10:16:48 UTC

RE: Cactus - possible bug

Hi Charles,

> -----Original Message-----
> From: Charles Massey [mailto:CMassey@corp.classmates.com]
> Sent: 08 July 2002 16:50
> To: 'vmassol@apache.org'
> Subject: Cactus - possible bug
> 
> Hi Vincent,
> 
> I came across what might be a possible bug in Cactus.  I am using a
> session
> cookie to re-use the session that is created on our application
server.  I
> receive the JSESSIONID cookie when the session is first created and
pass
> it
> back in the outgoing request for every subsequent textXXX method
calls.

How do you do that as there is no order in the tests ? Do you check in a
setUp() method if an instance variable (containing) is set and if so,
add a cookie to the request ? Or something like that ?

> 
> The cookie is successfully added to the request in the begin method.
> After
> Cactus executes the testXXX method, the second call to the
> ServletRedirector
> is called to get the result.  When this second call is performed,
Cactus
> creates a new WebRequest object and the state from the previous
WebRequest
> initialized in the beginXXX method is not called.  This second call,
to
> get
> the test result, is what is causing us problems.
> 
> We are using Dynamo and ATG has placed a 20 session limit on our
developer
> licenses, so that is why it is important to create as little sessions
as
> possible.

Arg! I would never have thought about that!

> 
> The work around that I found to solve this is to edit the
> AbstractHttpClient
> class and in the callGetResult method, add the cookie to the request
> object
> before the post is performed.  I have tested this solution out on my
> machine, and only two sessions are created for the entire test run.
> 
> I'm not sure if you would consider this a bug, so I thought I would
send
> this to you to see what you thought.

I would definitely not consider this a bug but more a feature request !
:-)

However, I would be happy to apply a patch if you submit one ...

Thanks
-Vincent

> 
> Thanks,
> Charley


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