Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6441

MockHttpSession and MockSessionStore don't call onInvalidate() on invalidate()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 8.0.0-M6
    • 7.10.0, 8.0.0-M9
    • wicket
    • None

    Description

      org.apache.wicket.protocol.http.mock.MockHttpSession on invalidate calls just:

      @Override
      public void invalidate()
      {
      	attributes.clear();
      	id = generateSessionId();
      }
      

      while org.apache.wicket.session.HttpSessionStore valueUnbound calls

      public void valueUnbound(final HttpSessionBindingEvent evt)
      {
      	String sessionId = evt.getSession().getId();
      	log.debug("Session unbound: {}", sessionId);
      	if (wicketSession != null)
      	{
      		wicketSession.onInvalidate();
      	}
      ...
      }
      

      (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.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            eximius Kamil
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: