Class MultiEnvTestFilter

java.lang.Object
org.projectnessie.junit.engine.MultiEnvTestFilter
All Implemented Interfaces:
org.junit.platform.engine.Filter<org.junit.platform.engine.TestDescriptor>, org.junit.platform.launcher.PostDiscoveryFilter

public class MultiEnvTestFilter extends Object implements org.junit.platform.launcher.PostDiscoveryFilter
This filter excludes multi-environment tests engines from the JUnit Jupiter Test Engine.

Background: MultiEnvTestEngine delegates test discovery to JUnit Jupiter to run each test class against a certain Nessie environment. However, JUnit Jupiter itself also discovers the same tests, yet those test instances would not have the expected Nessie services running during execution. Those tests can be skipped, but with this filter it's nicer, because JUnit Jupiter does not even attempt to run them. Therefore, the duplicate discoveries will not appear in IDEs and build output - less user confusion.

  • Constructor Details

    • MultiEnvTestFilter

      public MultiEnvTestFilter()
  • Method Details

    • apply

      public org.junit.platform.engine.FilterResult apply(org.junit.platform.engine.TestDescriptor test)
      Specified by:
      apply in interface org.junit.platform.engine.Filter<org.junit.platform.engine.TestDescriptor>