JSPWiki
  1. JSPWiki
  2. JSPWIKI-750

PageViewPluginTest is failing very often when using a JDK 7

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.4, 2.9
    • Fix Version/s: 2.9
    • Labels:
      None
    • Environment:

      Oracle JDK 7

      Description

      The PageViewPluginTest tests will fail if they aren't executed in the same order like they appear in the source file.
      JUnit never gave any grants in terms of execution ordering. Quite the contrary, relying on execution ordering is considered to be bad practice [1].
      However, up to JDK 6, it seemed to always be the same ordering like in the source code, so the tests were thought to be stable and deterministic. JDK 7 now changed this situation [2].

      Thanks to Glen Mazza for reporting this [3]!

      [1] http://www.javaworld.com/jw-12-2000/jw-1221-junit.html?page=2
      [2] http://stackoverflow.com/questions/3693626/how-to-run-test-methods-in-spec-order-in-junit4
      [3] http://mail-archives.apache.org/mod_mbox/incubator-jspwiki-dev/201210.mbox/%3C508C0CBB.4030304%40gmail.com%3E

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          13m 37s 1 Florian Holeczek 28/Oct/12 22:13
          Resolved Resolved Closed Closed
          34d 12h 23m 1 Florian Holeczek 02/Dec/12 10:37
          Florian Holeczek made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hide
          Florian Holeczek added a comment -

          Closing this, since 2.9 has been released

          Show
          Florian Holeczek added a comment - Closing this, since 2.9 has been released
          Florian Holeczek made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.9 [ 12319521 ]
          Fix Version/s 2.9.1 [ 12321249 ]
          Resolution Fixed [ 1 ]
          Hide
          Florian Holeczek added a comment -

          Because of JSPWIKI-665, I took the small solution and implemented the workaround mentioned at [1] (see above). Seems to work, couldn't reproduce the test failures anymore.

          Show
          Florian Holeczek added a comment - Because of JSPWIKI-665 , I took the small solution and implemented the workaround mentioned at [1] (see above). Seems to work, couldn't reproduce the test failures anymore.
          Florian Holeczek made changes -
          Field Original Value New Value
          Link This issue is related to JSPWIKI-665 [ JSPWIKI-665 ]
          Florian Holeczek created issue -

            People

            • Assignee:
              Florian Holeczek
              Reporter:
              Florian Holeczek
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development