Skip to content

@EnabledOnJre and @DisabledOnJre no longer work reliably with JRE.OTHER #5341

@filiphr

Description

@filiphr

Overview

We migrated from JUnit 5.10 to 5.14, and @DisabledOnJre(JRE.OTHER) no longer works as it used to before.

For example, on 5.14 the highest supported JRE is 26, which means if I run with Java 27-ea then I would expect the test not to run. However, the test with @DisabledOnJre(JRE.OTHER) does run with Java 27-ea.

Steps to reproduce

public class ExampleTest {

    @Test
    @DisabledOnJre(JRE.OTHER)
    void shouldNotRunOnJava27Ea() {
        fail("Should not run on Java 27-ea");
    }
}

Context

  • Used versions (Jupiter/Vintage/Platform): 5.14.2, 6.0.2
  • Build Tool/IDE:

Related Issues

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions