Skip to content

Commit

Permalink
Disable open-test-reporting output for executions triggered from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcphilipp committed Nov 15, 2024
1 parent dd6bd41 commit a3eac5f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions junit-vintage-engine/junit-vintage-engine.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies {
testImplementation(projects.junitPlatformSuiteEngine)
testImplementation(projects.junitPlatformTestkit)
testImplementation(testFixtures(projects.junitJupiterApi))
testImplementation(testFixtures(projects.junitPlatformReporting))

osgiVerification(projects.junitPlatformLauncher)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
junit.jupiter.extensions.autodetection.enabled=true
1 change: 1 addition & 0 deletions jupiter-tests/jupiter-tests.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies {
testImplementation(libs.memoryfilesystem)
testImplementation(testFixtures(projects.junitJupiterApi))
testImplementation(testFixtures(projects.junitJupiterEngine))
testImplementation(testFixtures(projects.junitPlatformReporting))
}

tasks {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
*/
class ExtensionRegistryTests {

private static final int NUM_DEFAULT_EXTENSIONS = 7;
private static final int NUM_CORE_EXTENSIONS = 7;
private static final int NUM_AUTO_REGISTERED_EXTENSIONS_IN_THIS_PROJECT = 1; // OpenTestReportGenerationSystemPropertyOverride
private static final int NUM_DEFAULT_EXTENSIONS = NUM_CORE_EXTENSIONS
+ NUM_AUTO_REGISTERED_EXTENSIONS_IN_THIS_PROJECT;

private final JupiterConfiguration configuration = mock();

Expand All @@ -49,7 +52,7 @@ class ExtensionRegistryTests {
void newRegistryWithoutParentHasDefaultExtensions() {
List<Extension> extensions = registry.getExtensions(Extension.class);

assertEquals(NUM_DEFAULT_EXTENSIONS, extensions.size());
assertEquals(NUM_CORE_EXTENSIONS, extensions.size());
assertDefaultGlobalExtensionsAreRegistered();
}

Expand Down
1 change: 1 addition & 0 deletions jupiter-tests/src/test/resources/junit-platform.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
junit.jupiter.extensions.autodetection.enabled=true

0 comments on commit a3eac5f

Please sign in to comment.