Lucene - Core
  1. Lucene - Core
  2. LUCENE-3762

Upgrade JUnit to 4.10, refactor state-machine of detecting setUp/tearDown call chaining.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      Both Lucene and Solr use JUnit 4.7. I suggest we move forward and upgrade to JUnit 4.10 which provides several infrastructural changes (serializable Description objects, class-level rules, various tweaks). JUnit 4.10 also changes (or fixes, depends how you look at it) the order in which @Before/@After hooks and @Rules are applied. This makes the old state-machine in LuceneTestCase fail (because the order is changed).

      I rewrote the state machine and used a different, I think simpler, although Uwe may disagree , mechanism in which the hook methods setUp/ tearDown are still there, but they are empty at the top level and serve only to detect whether subclasses chain super.setUp/tearDown properly (if they override anything).

      In the long term, I would love to just get rid of public setup/teardown methods and make them private (so that they cannot be overriden or even seen by subclasses) but this will require changes to the runner itself.

      1. LUCENE-3762.patch
        42 kB
        Dawid Weiss
      2. LUCENE-3762.patch
        35 kB
        Dawid Weiss
      3. LUCENE-3762.patch
        1.08 MB
        Dawid Weiss
      4. LUCENE-3762-backport.patch
        49 kB
        Dawid Weiss

        Activity

        Dawid Weiss created issue -
        Dawid Weiss made changes -
        Field Original Value New Value
        Attachment LUCENE-3762.patch [ 12513852 ]
        Dawid Weiss made changes -
        Attachment LUCENE-3762.patch [ 12513936 ]
        Dawid Weiss made changes -
        Attachment LUCENE-3762.patch [ 12514169 ]
        Dawid Weiss made changes -
        Attachment LUCENE-3762-backport.patch [ 12514479 ]
        Dawid Weiss made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Dawid Weiss made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Dawid Weiss made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Dawid Weiss
            Reporter:
            Dawid Weiss
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development