Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-3593

Conditionally Ignore Junit Tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Information Provided
    • 1.0.0, 1.2.0
    • None
    • Tools and Build

    Description

      We should incorporate a capability to conditionally ignore unit tests which are not relevant to certain condition, environment, language, locale etc.
      For example,

      1. YUI compressor fails on windows
      2. CEFParser fails on non-English environment and we are yet to get an updated version for that.

      Definitely, we can craft our test-cases to fit in, but that may lead to unintended foul-play. Instead of that if we run those tests in a quarantine, still we will have a clear view of what ran and what not as well as we will be able to proceed through a green build.

      As long as release management is concerned,

      1. we need to be very careful about choosing what to quarantine or conditionally ignore
      2. we should have a clean quarantine before release for certain environment.
        I am thinking about some annotation driven solution like the below one, so that we can easily track it and report.
        @IgnoreOn(since:Date, reason:String, conditionExpr:String)
        

      The way Junit's assume or assumeThat works doesn't fit in directly.
      Looking forward for inputs.

      Ref: https://martinfowler.com/articles/nonDeterminism.html#Quarantine

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              puspendu.banerjee@gmail.com Puspendu Banerjee
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: