You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Kamil (JIRA)" <ji...@apache.org> on 2017/08/14 11:57:00 UTC

[jira] [Updated] (WICKET-6441) MockHttpSession doesn't call onInvalidate() on invalidate()

     [ https://issues.apache.org/jira/browse/WICKET-6441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kamil updated WICKET-6441:
--------------------------
    Attachment: showcase-onInvalidate.zip

[~mgrigorov] here you have the quickstart testcase.
1)Run application
2)Click "Invalidate"
3)onInvalidate is being called

now run the "sessionInvalidatesSuccessfully" test - it fails

> MockHttpSession doesn't call onInvalidate() on invalidate()
> -----------------------------------------------------------
>
>                 Key: WICKET-6441
>                 URL: https://issues.apache.org/jira/browse/WICKET-6441
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 8.0.0-M6
>            Reporter: Kamil
>         Attachments: showcase-onInvalidate.zip
>
>
> org.apache.wicket.protocol.http.mock.MockHttpSession on invalidate calls just:
> {code}
> @Override
> public void invalidate()
> {
> 	attributes.clear();
> 	id = generateSessionId();
> }
> {code}
> while org.apache.wicket.session.HttpSessionStore valueUnbound calls
> {code}
> public void valueUnbound(final HttpSessionBindingEvent evt)
> {
> 	String sessionId = evt.getSession().getId();
> 	log.debug("Session unbound: {}", sessionId);
> 	if (wicketSession != null)
> 	{
> 		wicketSession.onInvalidate();
> 	}
> ...
> }
> {code}
> (valueUnbound is called on org.apache.catalina.session.StandardSession.invalidate)
> this causes to be impossible to properly test what happens on invalidation of the session.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)