> -----Original Message-----
> From: Kazuhito SUGURI [mailto:[EMAIL PROTECTED]
> Sent: jeudi 11 novembre 2004 12:40
> To: [EMAIL PROTECTED]
> Subject: Re: FilterRedirector does not initialize sessions. - IS THIS A
> BUG ??
>
> Hi Vincent,
>
> In article <[EMAIL PROTECTED]>,
> Thu, 11 Nov 2004 11:02:13 +0100,
> "Vincent Massol" <[EMAIL PROTECTED]> wrote:
> vmassol> Kazuhito, do you agree we should have the same behavior for
> Filters than we
> vmassol> have for Servlets?
>
> At this moment, I cannot agree with that because
> I think it may have impact to existing FilterTestCases
> as it changes the precondition of testXXX methods.
Yes, you're right it will change preconditions for tests assuming that no
session is created.
I'd still suggest we implement the feature to support the
setAutomaticSession() for FilterTestCase but I'm ok to have it of by
default. BTW, after looking at the code again, I think this is the default
for Servlets too, so that's ok.
> If someone have testIfSessionNotExists(), for example,
> they have to have beginIfSessionNotExists() which has
> setAutomaticSession(false).
>
> I think it is enough with change of the document.
Don't you agree with Pedro that the following test case should pass and that
it is a Cactus bug?
public class SessionFilterTest extends FilterTestCase {
....
public void beginSession(WebRequest request) {
request.setAutomaticSession(true);
}
public void testSession() {
HttpSession session = request.getSession(false);
assertNotNull("There should be a session", session);
}
}
Thanks
-Vincent
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]