Wicket
  1. Wicket
  2. WICKET-3145

MockWebApplication does not allow to manually clear cookiesOfThisSession

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.12
    • Fix Version/s: 1.4.19
    • Component/s: wicket
    • Labels:
      None

      Description

      MockWebApplication does not allow to manually clear cookiesOfThisSession

      Often it is needed for testing various cookie scenarios to have the ability to clear cookiesOfThisSession and sort of start fresh. Especially when reusing WicketTester between junit tests for faster performance and less initialization overhead.

      Workaround:
      Collection<?> cookiesOfThisSession = Utils.getFieldValue("cookiesOfThisSession", Collection.class, wicketTester);
      cookiesOfThisSession.clear();

        Activity

        Igor Vaynberg made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Igor Vaynberg [ ivaynberg ]
        Fix Version/s 1.4.19 [ 12317570 ]
        Resolution Fixed [ 1 ]
        Martin Grigorov made changes -
        Summary MockHttpServletResponse does not allow to manually clear cookiesOfThisSession MockWebApplication does not allow to manually clear cookiesOfThisSession
        Description MockHttpServletResponse does not allow to manually clear cookiesOfThisSession

        Often it is needed for testing various cookie scenarios to have the ability to clear cookiesOfThisSession and sort of start fresh. Especially when reusing WicketTester between junit tests for faster performance and less initialization overhead.

        Workaround:
              Collection<?> cookiesOfThisSession = Utils.getFieldValue("cookiesOfThisSession", Collection.class, wicketTester);
              cookiesOfThisSession.clear();
        MockWebApplication does not allow to manually clear cookiesOfThisSession

        Often it is needed for testing various cookie scenarios to have the ability to clear cookiesOfThisSession and sort of start fresh. Especially when reusing WicketTester between junit tests for faster performance and less initialization overhead.

        Workaround:
              Collection<?> cookiesOfThisSession = Utils.getFieldValue("cookiesOfThisSession", Collection.class, wicketTester);
              cookiesOfThisSession.clear();
        Martin Grigorov made changes -
        Affects Version/s 1.5-M2.1 [ 12315331 ]
        Martin Makundi made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Minor [ 4 ]
        Martin Makundi created issue -

          People

          • Assignee:
            Igor Vaynberg
            Reporter:
            Martin Makundi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.5h
              0.5h
              Remaining:
              Remaining Estimate - 0.5h
              0.5h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development