Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into leo/fix-for-join-pool…
Browse files Browse the repository at this point in the history
…-thread-deadlock
  • Loading branch information
marcphilipp committed Sep 13, 2024
2 parents 4d1b121 + 9f5cfc9 commit d00a538
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 47 deletions.
12 changes: 1 addition & 11 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'config:best-practices',
':automergeAll',
'github>junit-team/renovate-config',
],
packageRules: [
{
Expand Down Expand Up @@ -32,14 +31,5 @@
'org.opentest4j.reporting:{/,}**',
],
},
{
allowedVersions: '!/4\\.33\\.0/',
description: [
'Due to https://github.com/diffplug/spotless/issues/2255',
],
matchPackageNames: [
'org.eclipse.platform:{/,}**'
]
},
],
}
12 changes: 6 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ asciidoctorj-pdf = "2.3.18"
asciidoctor-plugins = "4.0.3" # Check if workaround in documentation.gradle.kts can be removed when upgrading
assertj = "3.26.3"
bnd = "7.0.0"
checkstyle = "10.17.0"
checkstyle = "10.18.1"
eclipse = "4.32.0"
jackson = "2.17.2"
jacoco = "0.8.12"
jmh = "1.37"
junit4 = "4.13.2"
junit4Min = "4.12"
ktlint = "1.3.1"
log4j = "2.23.1"
log4j = "2.24.0"
opentest4j = "1.3.0"
openTestReporting = "0.1.0-M2"
surefire = "3.3.1"
surefire = "3.5.0"
xmlunit = "2.10.0"

[libraries]
Expand Down Expand Up @@ -53,7 +53,7 @@ log4j-jul = { module = "org.apache.logging.log4j:log4j-jul", version.ref = "log4
maven = { module = "org.apache.maven:apache-maven", version = "3.9.9" }
mavenSurefirePlugin = { module = "org.apache.maven.plugins:maven-surefire-plugin", version.ref = "surefire" }
memoryfilesystem = { module = "com.github.marschall:memoryfilesystem", version = "2.8.0" }
mockito = { module = "org.mockito:mockito-junit-jupiter", version = "5.12.0" }
mockito = { module = "org.mockito:mockito-junit-jupiter", version = "5.13.0" }
nohttp-checkstyle = { module = "io.spring.nohttp:nohttp-checkstyle", version = "0.0.11" }
opentest4j = { module = "org.opentest4j:opentest4j", version.ref = "opentest4j" }
openTestReporting-events = { module = "org.opentest4j.reporting:open-test-reporting-events", version.ref = "openTestReporting" }
Expand Down Expand Up @@ -85,12 +85,12 @@ asciidoctorPdf = { id = "org.asciidoctor.jvm.pdf", version.ref = "asciidoctor-pl
bnd = { id = "biz.aQute.bnd", version.ref = "bnd" }
buildParameters = { id = "org.gradlex.build-parameters", version = "1.4.4" }
commonCustomUserData = { id = "com.gradle.common-custom-user-data-gradle-plugin", version = "2.0.2" }
develocity = { id = "com.gradle.develocity", version = "3.17.6" }
develocity = { id = "com.gradle.develocity", version = "3.18.1" }
foojayResolver = { id = "org.gradle.toolchains.foojay-resolver", version = "0.8.0" }
gitPublish = { id = "org.ajoberstar.git-publish", version = "4.2.2" }
jmh = { id = "me.champeau.jmh", version = "0.7.2" }
nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version = "2.0.0" }
plantuml = { id = "io.freefair.plantuml", version = "8.6" }
shadow = { id = "com.gradleup.shadow", version = "8.3.1" }
spotless = { id = "com.diffplug.spotless", version = "7.0.0.BETA1" }
spotless = { id = "com.diffplug.spotless", version = "7.0.0.BETA2" }
versions = { id = "com.github.ben-manes.versions", version = "0.51.0" }
4 changes: 0 additions & 4 deletions gradle/plugins/code-generator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ plugins {
`kotlin-dsl`
}

repositories {
gradlePluginPortal()
}

dependencies {
implementation("junitbuild.base:code-generator-model")
implementation(projects.common)
Expand Down
4 changes: 0 additions & 4 deletions gradle/plugins/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ plugins {
`kotlin-dsl`
}

repositories {
gradlePluginPortal()
}

dependencies {
implementation(projects.buildParameters)
implementation(kotlin("gradle-plugin"))
Expand Down
3 changes: 3 additions & 0 deletions gradle/plugins/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ dependencyResolutionManagement {
from(files("../libs.versions.toml"))
}
}
repositories {
gradlePluginPortal()
}
}

rootProject.name = "plugins"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,24 @@
package org.junit.platform.engine.support.hierarchical;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.Mockito.when;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.platform.commons.JUnitException;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

@ExtendWith(MockitoExtension.class)
class ForkJoinPoolHierarchicalTestExecutorServiceTests {

@Mock
ParallelExecutionConfiguration configuration;

@Test
void exceptionsFromInvalidConfigurationAreNotSwallowed() {
when(configuration.getParallelism()).thenReturn(2);
when(configuration.getMaxPoolSize()).thenReturn(1); // invalid, should be > parallelism
when(configuration.getCorePoolSize()).thenReturn(1);
when(configuration.getMinimumRunnable()).thenReturn(1);
when(configuration.getSaturatePredicate()).thenReturn(__ -> true);
when(configuration.getKeepAliveSeconds()).thenReturn(0);

JUnitException exception = assertThrows(JUnitException.class,
() -> new ForkJoinPoolHierarchicalTestExecutorService(configuration));
var configuration = new DefaultParallelExecutionConfiguration(2, 1, 1, 1, 0, __ -> true);

JUnitException exception = assertThrows(JUnitException.class, () -> {
try (var pool = new ForkJoinPoolHierarchicalTestExecutorService(configuration)) {
assertNotNull(pool, "we won't get here");
}
});

assertThat(exception).hasMessage("Failed to create ForkJoinPool");
assertThat(exception).rootCause().isInstanceOf(IllegalArgumentException.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.13.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.13.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.13.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.13.0</version>
<configuration>
<release>11</release>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion platform-tooling-support-tests/projects/vintage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.13.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down

0 comments on commit d00a538

Please sign in to comment.