Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-10951 migration from Junit 3 to 4 phase 2 (follow-up to IGNITE-10173)
  3. IGNITE-10629

Migration follow up: check for old style tests that could be slipped through in transition period

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.8
    • 2.8
    • None

    Description

      We need to account for risk that while tests are migrating some commits may by mistake slip in old style test cases - that will be ignored by JUnit 4.

      In order to address possible issues of that kind, do the following a week or two after IGNITE-10177 is merged to master: run the IntelliJ inspection called "old style Junit test method in JUnit 4 class", review report and fix discovered problems if there are any.

      For the reference, my version of IDE explains this inspection as follows:

      Reports JUnit 3 style test methods which are located inside a class which does not extend the abstract JUnit 3 class TestCase and contains JUnit 4/JUnit 5 @Test annotated methods.

      (note concerns mentioned in this ticket were originally raised at dev list: here)


      Another part of this task is to find (and rework if there are still any) classes that still extend junit.framework.TestCase. These classes are technically legal but after vast majority have been migrated they became harmful from maintenance perspective, by forcing readers of their code learn details of obsolete framework version that lacks many important features. One particularly bad thing about such tests is that they deprive maintainers standard ways to suppress test execution using modern JUnit API of Ignore and Assume.

      Attachments

        1. junit_inspections.xml
          172 kB
          Oleg Ignatenko

        Issue Links

          Activity

            People

              oignatenko Oleg Ignatenko
              oignatenko Oleg Ignatenko
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m