Need a rule in common test helper to clean authentication context for unit test

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Core - Macros Platform
    • None

      Issue Summary

      This is reproducible on Data Center: (yes)

      Steps to Reproduce

      Recently introduced a rule named AuthenticationContextTestRule in 

      confluence-advanced-macros-plugin and also in confluence-attachments-plugin (here)

      As we copy this AuthenticationContextTestRule across plugins. we think we should move it to a common place. But problem is where and there is JUnit3 vs JUnit4 problem, some plugin still uses JUnit3.  

      So this ticket to track down above mentioned issue.

      Expected Results

      Unit tests should guarantee that the threadlocal is null when they complete. We should have a Rule for this in a confluence test utils library.

      Actual Results

      No common rule that the threadlocal is null when unit tests complete

      Workaround

      Required, if there is no workaround please state:
      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Assignee:
              Unassigned
              Reporter:
              Saquia Naz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: