You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "David Handermann (Jira)" <ji...@apache.org> on 2022/03/25 16:32:00 UTC
[jira] [Resolved] (NIFI-3593) Conditionally Ignore Junit Tests
[ https://issues.apache.org/jira/browse/NIFI-3593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Handermann resolved NIFI-3593.
------------------------------------
Resolution: Information Provided
JUnit 5 provides annotations for conditional enabling or disabling of unit tests.
> Conditionally Ignore Junit Tests
> --------------------------------
>
> Key: NIFI-3593
> URL: https://issues.apache.org/jira/browse/NIFI-3593
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Tools and Build
> Affects Versions: 1.0.0, 1.2.0
> Reporter: Puspendu Banerjee
> Priority: Minor
> Labels: build, environment, junit
>
> We should incorporate a capability to conditionally ignore unit tests which are not relevant to certain condition, environment, language, locale etc.
> For example,
> # YUI compressor fails on windows
> # 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,
> # we need to be very careful about choosing what to quarantine or conditionally ignore
> # 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.
> {code:java}
> @IgnoreOn(since:Date, reason:String, conditionExpr:String)
> {code}
> 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
--
This message was sent by Atlassian Jira
(v8.20.1#820001)