diff --git a/build-tools/geode-repeat-test/src/main/java/org/apache/geode/gradle/testing/repeat/ExecutionTrackingTestResultProcessor.java b/build-tools/geode-repeat-test/src/main/java/org/apache/geode/gradle/testing/repeat/ExecutionTrackingTestResultProcessor.java index 4d0e76d27f88..ff8ce91599d6 100644 --- a/build-tools/geode-repeat-test/src/main/java/org/apache/geode/gradle/testing/repeat/ExecutionTrackingTestResultProcessor.java +++ b/build-tools/geode-repeat-test/src/main/java/org/apache/geode/gradle/testing/repeat/ExecutionTrackingTestResultProcessor.java @@ -25,6 +25,7 @@ import org.gradle.api.internal.tasks.testing.TestResultProcessor; import org.gradle.api.internal.tasks.testing.TestStartEvent; import org.gradle.api.internal.tasks.testing.worker.WorkerTestClassProcessor; +import org.gradle.api.tasks.testing.TestFailure; import org.gradle.api.tasks.testing.TestOutputEvent; /** @@ -68,7 +69,8 @@ public void output(Object testId, TestOutputEvent event) { } @Override - public void failure(Object testId, Throwable result) { + public void failure(Object testId, TestFailure result) { + // TestResultProcessor interface was updated in Gradle 7.6.6 to use TestFailure instead of Throwable processor.failure(testId, result); } diff --git a/build-tools/geode-repeat-test/src/main/java/org/apache/geode/gradle/testing/repeat/RepeatTestExecuter.java b/build-tools/geode-repeat-test/src/main/java/org/apache/geode/gradle/testing/repeat/RepeatTestExecuter.java index 58f068106d42..1241a66f77d6 100644 --- a/build-tools/geode-repeat-test/src/main/java/org/apache/geode/gradle/testing/repeat/RepeatTestExecuter.java +++ b/build-tools/geode-repeat-test/src/main/java/org/apache/geode/gradle/testing/repeat/RepeatTestExecuter.java @@ -44,6 +44,7 @@ import org.gradle.internal.actor.ActorFactory; import org.gradle.internal.time.Clock; import org.gradle.internal.work.WorkerLeaseRegistry; +import org.gradle.internal.work.WorkerLeaseService; import org.gradle.process.internal.worker.WorkerProcessFactory; /** @@ -72,6 +73,7 @@ public class RepeatTestExecuter implements TestExecuter { private final ActorFactory actorFactory; private final ModuleRegistry moduleRegistry; private final WorkerLeaseRegistry workerLeaseRegistry; + private final WorkerLeaseService workerLeaseService; private final int maxWorkerCount; private final Clock clock; private final DocumentationRegistry documentationRegistry; @@ -79,14 +81,16 @@ public class RepeatTestExecuter implements TestExecuter { private final int iterationCount; private TestClassProcessor processor; + // Gradle 7.6.6: WorkerLeaseRegistry became private, use WorkerLeaseService instead public RepeatTestExecuter(WorkerProcessFactory workerFactory, ActorFactory actorFactory, - ModuleRegistry moduleRegistry, WorkerLeaseRegistry workerLeaseRegistry, int maxWorkerCount, + ModuleRegistry moduleRegistry, WorkerLeaseService workerLeaseService, int maxWorkerCount, Clock clock, DocumentationRegistry documentationRegistry, DefaultTestFilter testFilter, int iterationCount) { this.workerFactory = workerFactory; this.actorFactory = actorFactory; this.moduleRegistry = moduleRegistry; - this.workerLeaseRegistry = workerLeaseRegistry; + this.workerLeaseRegistry = null; // Keep for backward compatibility but not used + this.workerLeaseService = workerLeaseService; this.maxWorkerCount = maxWorkerCount; this.clock = clock; this.documentationRegistry = documentationRegistry; @@ -99,17 +103,15 @@ public void execute(final JvmTestExecutionSpec testExecutionSpec, TestResultProcessor testResultProcessor) { final TestFramework testFramework = testExecutionSpec.getTestFramework(); final WorkerTestClassProcessorFactory testInstanceFactory = testFramework.getProcessorFactory(); - final WorkerLeaseRegistry.WorkerLease - currentWorkerLease = - workerLeaseRegistry.getCurrentWorkerLease(); final Set classpath = ImmutableSet.copyOf(testExecutionSpec.getClasspath()); final Set modulePath = ImmutableSet.copyOf(testExecutionSpec.getModulePath()); final List testWorkerImplementationModules = testFramework.getTestWorkerImplementationModules(); final Factory forkingProcessorFactory = () -> { + // Gradle 7.6.6: Worker API changed to require WorkerLeaseService for thread management TestClassProcessor forkingTestClassProcessor = - new ForkingTestClassProcessor(currentWorkerLease, workerFactory, testInstanceFactory, + new ForkingTestClassProcessor(workerLeaseService, workerFactory, testInstanceFactory, testExecutionSpec.getJavaForkOptions(), classpath, modulePath, testWorkerImplementationModules, testFramework.getWorkerConfigurationAction(), moduleRegistry, documentationRegistry); @@ -139,7 +141,8 @@ public void execute(final JvmTestExecutionSpec testExecutionSpec, detector = new DefaultTestClassScanner(testClassFiles, null, processor); } - new TestMainAction(detector, processor, testResultProcessor, clock, testExecutionSpec.getPath(), + // Gradle 7.6.6: TestMainAction constructor changed to accept WorkerLeaseService for resource management + new TestMainAction(detector, processor, testResultProcessor, workerLeaseService, clock, testExecutionSpec.getPath(), "Gradle Test Run " + testExecutionSpec.getIdentityPath()).run(); } diff --git a/build-tools/geode-testing-isolation/src/main/groovy/org/apache/geode/gradle/testing/Workers.groovy b/build-tools/geode-testing-isolation/src/main/groovy/org/apache/geode/gradle/testing/Workers.groovy index 0402465dbea1..b7f38200b6b4 100644 --- a/build-tools/geode-testing-isolation/src/main/groovy/org/apache/geode/gradle/testing/Workers.groovy +++ b/build-tools/geode-testing-isolation/src/main/groovy/org/apache/geode/gradle/testing/Workers.groovy @@ -32,6 +32,8 @@ class Workers { ProcessLauncher processLauncher, MessagingServer messagingServer) { def workerImplementationFactory = donor.workerImplementationFactory + // Gradle 7.5.1+: jvmVersionDetector moved from workerImplementationFactory to donor + def jvmVersionDetector = donor.jvmVersionDetector return new LauncherProxyWorkerProcessFactory( donor.loggingManager, messagingServer, @@ -40,7 +42,7 @@ class Workers { workerImplementationFactory.gradleUserHomeDir, workerImplementationFactory.temporaryFileProvider, donor.execHandleFactory, - workerImplementationFactory.jvmVersionDetector, + jvmVersionDetector, donor.outputEventListener, donor.memoryManager, processLauncher) diff --git a/build-tools/geode-testing-isolation/src/main/java/org/apache/geode/gradle/testing/process/LauncherProxyWorkerProcessBuilder.java b/build-tools/geode-testing-isolation/src/main/java/org/apache/geode/gradle/testing/process/LauncherProxyWorkerProcessBuilder.java index a18f087b445b..833612e4a876 100644 --- a/build-tools/geode-testing-isolation/src/main/java/org/apache/geode/gradle/testing/process/LauncherProxyWorkerProcessBuilder.java +++ b/build-tools/geode-testing-isolation/src/main/java/org/apache/geode/gradle/testing/process/LauncherProxyWorkerProcessBuilder.java @@ -128,6 +128,11 @@ public void enableJvmMemoryInfoPublishing(boolean shouldPublish) { delegate.enableJvmMemoryInfoPublishing(shouldPublish); } + @Override + public WorkerProcessBuilder setUseLegacyAddOpens(boolean useLegacyAddOpens) { + return delegate.setUseLegacyAddOpens(useLegacyAddOpens); + } + /** * Replaces the standard worker process's process launcher with this builder's launcher. */ diff --git a/build-tools/scripts/src/main/groovy/check-pom.gradle b/build-tools/scripts/src/main/groovy/check-pom.gradle index d73492f3a805..65087faeaed5 100644 --- a/build-tools/scripts/src/main/groovy/check-pom.gradle +++ b/build-tools/scripts/src/main/groovy/check-pom.gradle @@ -174,7 +174,10 @@ tasks.register('updateExpectedPom', Copy) { expectedPomFile.toFile().withWriter { writer -> groovy.xml.XmlUtil.serialize(pomRoot).eachLine { line -> line = line.replaceFirst(/>\n<") - writer.writeLine(line) + // Skip lines that contain only whitespace + if (line.trim().length() > 0) { + writer.writeLine(line) + } } } } diff --git a/build-tools/scripts/src/main/groovy/geode-publish-common.gradle b/build-tools/scripts/src/main/groovy/geode-publish-common.gradle index fc78d2acc7c8..c9bcc6b3a6c6 100644 --- a/build-tools/scripts/src/main/groovy/geode-publish-common.gradle +++ b/build-tools/scripts/src/main/groovy/geode-publish-common.gradle @@ -71,12 +71,20 @@ publishing { } } } - afterEvaluate { - withXml { - def providerAsElement = asElement() - providerAsElement.insertBefore( - providerAsElement.ownerDocument().createComment(apacheLicense), - providerAsElement.firstChild) + } + + // Use afterEvaluate to post-process the generated POM file + project.afterEvaluate { + tasks.withType(GenerateMavenPom).configureEach { task -> + task.doLast { + // Remove extra blank lines from the generated POM + def pomFile = task.destination + if (pomFile.exists()) { + def content = pomFile.text + // Remove lines that contain only whitespace + content = content.replaceAll(/(?m)^\s+$\n/, '') + pomFile.text = content + } } } } diff --git a/build.gradle b/build.gradle index 59c2e0a2ed9a..462620fc7a8b 100755 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,7 @@ plugins { id "base" id "idea" id "eclipse" - id "com.diffplug.spotless" version "6.4.1" apply false + id "com.diffplug.spotless" version "6.11.0" apply false id "com.github.ben-manes.versions" version "0.42.0" apply false id "nebula.lint" version "17.7.0" apply false id "com.palantir.docker" version "0.32.0" apply false diff --git a/extensions/geode-modules-tomcat10/src/test/resources/expected-pom.xml b/extensions/geode-modules-tomcat10/src/test/resources/expected-pom.xml index 1b3957f9ed07..54bc453ad943 100644 --- a/extensions/geode-modules-tomcat10/src/test/resources/expected-pom.xml +++ b/extensions/geode-modules-tomcat10/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-modules-tomcat10 @@ -52,8 +36,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/extensions/geode-modules/src/test/resources/expected-pom.xml b/extensions/geode-modules/src/test/resources/expected-pom.xml index c97e5872d641..794531d9dd30 100644 --- a/extensions/geode-modules/src/test/resources/expected-pom.xml +++ b/extensions/geode-modules/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-modules @@ -52,8 +36,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -96,8 +80,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -107,8 +91,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -118,8 +102,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-common/src/test/java/org/apache/geode/util/internal/UncheckedUtilsTest.java b/geode-common/src/test/java/org/apache/geode/util/internal/UncheckedUtilsTest.java index 42279fa10e6d..740f55d5bd58 100644 --- a/geode-common/src/test/java/org/apache/geode/util/internal/UncheckedUtilsTest.java +++ b/geode-common/src/test/java/org/apache/geode/util/internal/UncheckedUtilsTest.java @@ -54,7 +54,8 @@ public void uncheckedCast_rawList_wrongTypes() { List wrongType = uncheckedCast(rawList); Throwable thrown = catchThrowable(() -> { - String str = wrongType.get(0); // This should throw ClassCastException + // Explicit assignment needed to trigger ClassCastException in newer Gradle versions + String str = wrongType.get(0); }); assertThat(thrown).isInstanceOf(ClassCastException.class); diff --git a/geode-common/src/test/resources/expected-pom.xml b/geode-common/src/test/resources/expected-pom.xml index 374eda1da262..f325fd7c4d26 100644 --- a/geode-common/src/test/resources/expected-pom.xml +++ b/geode-common/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-common @@ -52,8 +36,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-concurrency-test/src/test/resources/expected-pom.xml b/geode-concurrency-test/src/test/resources/expected-pom.xml index 2940e8b56ce4..ac4cddba01f9 100644 --- a/geode-concurrency-test/src/test/resources/expected-pom.xml +++ b/geode-concurrency-test/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-concurrency-test @@ -52,8 +36,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-connectors/src/test/resources/expected-pom.xml b/geode-connectors/src/test/resources/expected-pom.xml index 6a30589edb13..2eb4a8c91252 100644 --- a/geode-connectors/src/test/resources/expected-pom.xml +++ b/geode-connectors/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-connectors @@ -52,8 +36,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -96,8 +80,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -107,8 +91,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -118,8 +102,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -129,8 +113,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -140,8 +124,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -151,8 +135,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -162,8 +146,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j true @@ -174,32 +158,32 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j - cglib * + cglib - asm * + asm - spring-aop * + spring-aop - guava * + guava - aopalliance * + aopalliance - spring-context-support * + spring-context-support @@ -209,8 +193,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-core/src/test/resources/expected-pom.xml b/geode-core/src/test/resources/expected-pom.xml index 4b0caecf2602..230fd475315e 100644 --- a/geode-core/src/test/resources/expected-pom.xml +++ b/geode-core/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-core @@ -52,8 +36,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -96,8 +80,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -107,8 +91,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -118,8 +102,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -129,8 +113,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -140,8 +124,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -151,8 +135,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -162,8 +146,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -173,8 +157,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -184,8 +168,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -195,8 +179,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -206,8 +190,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -217,8 +201,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -228,8 +212,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -239,8 +223,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -250,8 +234,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -261,8 +245,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -272,8 +256,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j true @@ -284,8 +268,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j true @@ -296,8 +280,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -307,8 +291,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -318,8 +302,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -329,8 +313,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -340,8 +324,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -351,8 +335,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -362,8 +346,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -373,8 +357,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -384,8 +368,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -395,8 +379,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -406,12 +390,12 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j - * * + * @@ -421,8 +405,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -432,8 +416,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j true @@ -444,8 +428,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-cq/src/test/resources/expected-pom.xml b/geode-cq/src/test/resources/expected-pom.xml index 3238e6c3c48f..7936f4968476 100644 --- a/geode-cq/src/test/resources/expected-pom.xml +++ b/geode-cq/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-cq @@ -52,8 +36,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -96,8 +80,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-deployment/geode-deployment-legacy/src/test/resources/expected-pom.xml b/geode-deployment/geode-deployment-legacy/src/test/resources/expected-pom.xml index 70dd4cd8828d..c550af5a2a3b 100644 --- a/geode-deployment/geode-deployment-legacy/src/test/resources/expected-pom.xml +++ b/geode-deployment/geode-deployment-legacy/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - - + 4.0.0 org.apache.geode geode-deployment-legacy diff --git a/geode-dunit/src/test/resources/expected-pom.xml b/geode-dunit/src/test/resources/expected-pom.xml index d33bf896f47f..52f7ec178dd0 100644 --- a/geode-dunit/src/test/resources/expected-pom.xml +++ b/geode-dunit/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-dunit @@ -52,12 +36,12 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j - geode-core * + geode-core @@ -67,8 +51,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -78,8 +62,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -89,8 +73,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -100,8 +84,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -111,8 +95,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -122,8 +106,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -133,8 +117,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -144,12 +128,12 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j - geode-core * + geode-core @@ -159,8 +143,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -170,8 +154,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -181,8 +165,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -192,8 +176,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -203,8 +187,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -214,36 +198,36 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j - cglib * + cglib - spring-core * + spring-core - asm * + asm - spring-aop * + spring-aop - guava * + guava - aopalliance * + aopalliance - spring-context-support * + spring-context-support true @@ -254,8 +238,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -265,12 +249,12 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j - junit-dep * + junit-dep @@ -280,8 +264,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -291,8 +275,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -302,8 +286,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -313,8 +297,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -324,12 +308,12 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j - hamcrest * + hamcrest diff --git a/geode-gfsh/src/test/resources/expected-pom.xml b/geode-gfsh/src/test/resources/expected-pom.xml index c0a34b4cbaa2..33a139f2b299 100644 --- a/geode-gfsh/src/test/resources/expected-pom.xml +++ b/geode-gfsh/src/test/resources/expected-pom.xml @@ -1,611 +1,298 @@ - - - 4.0.0 - org.apache.geode - geode-gfsh - ${version} - Apache Geode - Apache Geode provides a database-like consistency model, reliable transaction processing and a shared-nothing architecture to maintain very low latency performance with high concurrency processing - http://geode.apache.org - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - - - - scm:git:https://github.com:apache/geode.git - scm:git:https://github.com:apache/geode.git - https://github.com/apache/geode - - - - - org.apache.geode - geode-all-bom - ${version} - pom - import - - - - - - org.apache.geode - geode-core - compile - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - org.apache.geode - geode-common - compile - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - org.springframework.shell - spring-shell-starter - compile - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - cglib - * - + cglib - - - asm - * - + asm - - - spring-aop - * - + spring-aop - - - guava - * - + guava - - - aopalliance - * - + aopalliance - - - spring-context-support - * - + spring-context-support - - - - org.apache.geode - geode-logging - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - org.apache.geode - geode-membership - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - org.apache.geode - geode-serialization - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - org.apache.geode - geode-unsafe - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - org.springframework - spring-web - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - spring-core - * - + spring-core - - - commons-logging - * - + commons-logging - - - - org.apache.commons - commons-lang3 - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - com.healthmarketscience.rmiio - rmiio - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - com.fasterxml.jackson.core - jackson-databind - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - io.swagger.core.v3 - swagger-annotations - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - jakarta.xml.bind - jakarta.xml.bind-api - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - net.sf.jopt-simple - jopt-simple - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - org.apache.logging.log4j - log4j-api - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - org.apache.geode - geode-log4j - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - org.springframework - spring-core - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - true - - - org.springframework - spring-aop - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - org.glassfish.jaxb - jaxb-runtime - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - jakarta.activation - jakarta.activation-api - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - org.apache.logging.log4j - log4j-jul - runtime - - - - log4j-to-slf4j - org.apache.logging.log4j - + log4j-to-slf4j - - - - diff --git a/geode-http-service/src/test/resources/expected-pom.xml b/geode-http-service/src/test/resources/expected-pom.xml index b768efe732db..6b9ae1caee15 100644 --- a/geode-http-service/src/test/resources/expected-pom.xml +++ b/geode-http-service/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-http-service @@ -52,8 +36,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -96,8 +80,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -107,8 +91,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -118,8 +102,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-jmh/src/test/resources/expected-pom.xml b/geode-jmh/src/test/resources/expected-pom.xml index be1bcecb491b..ad2710ee841c 100644 --- a/geode-jmh/src/test/resources/expected-pom.xml +++ b/geode-jmh/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-jmh @@ -52,8 +36,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-junit/src/integrationTest/java/org/apache/geode/internal/UniquePortSupplierConcurrencyTest.java b/geode-junit/src/integrationTest/java/org/apache/geode/internal/UniquePortSupplierConcurrencyTest.java new file mode 100644 index 000000000000..a2a9540fbbc4 --- /dev/null +++ b/geode-junit/src/integrationTest/java/org/apache/geode/internal/UniquePortSupplierConcurrencyTest.java @@ -0,0 +1,161 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.internal; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +import org.junit.After; +import org.junit.Test; + +/** + * Test that demonstrates the race condition when multiple UniquePortSupplier instances + * (simulating parallel test classes with --max-workers=12) allocate ports simultaneously. + * + * Uses a CONSTRAINED port range to dramatically increase collision probability. + * + *

+ * WITHOUT FIX: This test will show port collisions (same port allocated multiple times) + * WITH FIX: This test will pass (all ports unique across instances) + */ +public class UniquePortSupplierConcurrencyTest { + + // Constrained port range to increase collision probability + private static final int PORT_RANGE_START = 30000; + private static final int PORT_RANGE_SIZE = 100; // 100 ports available + + @After + public void cleanup() { + UniquePortSupplier.clearGlobalCache(); + } + + @Test + public void testMultipleInstancesCanCollideDuringParallelAllocation() throws Exception { + // With 100 ports and 30 instances each allocating 2 ports (60 total), + // WITHOUT FIX: collisions are highly likely due to lack of coordination + // WITH FIX: all 60 ports can be successfully allocated without collision + final int numInstances = 30; + final int portsPerInstance = 2; + final CountDownLatch startLatch = new CountDownLatch(1); + final CountDownLatch doneLatch = new CountDownLatch(numInstances); + + final Map portAllocationCount = new ConcurrentHashMap<>(); + + ExecutorService executor = Executors.newFixedThreadPool(numInstances); + + try { + // Simulate parallel "test classes", each creating its own UniquePortSupplier + for (int i = 0; i < numInstances; i++) { + executor.submit(() -> { + try { + startLatch.await(); // Wait for all threads to be ready + + // Each "test class" creates its own UniquePortSupplier with constrained port range + Random random = new Random(); + UniquePortSupplier supplier = new UniquePortSupplier( + () -> PORT_RANGE_START + random.nextInt(PORT_RANGE_SIZE)); + + // Allocate ports + for (int j = 0; j < portsPerInstance; j++) { + int port = supplier.getAvailablePort(); + + // Track how many times this port was allocated + portAllocationCount.computeIfAbsent(port, k -> new AtomicInteger(0)) + .incrementAndGet(); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + doneLatch.countDown(); + } + }); + } + + // Start all threads simultaneously to maximize concurrency + startLatch.countDown(); + + // Wait for completion + boolean completed = doneLatch.await(30, TimeUnit.SECONDS); + assertThat(completed).as("All instances should complete").isTrue(); + + // Analyze results + System.out.println("\n========================================"); + System.out.println("=== Port Collision Test Results ==="); + System.out.println( + "Port Range: " + PORT_RANGE_START + "-" + (PORT_RANGE_START + PORT_RANGE_SIZE - 1)); + System.out.println("Available ports: " + PORT_RANGE_SIZE); + System.out.println("Instances: " + numInstances); + System.out.println("Ports per instance: " + portsPerInstance); + System.out.println("Total allocations: " + (numInstances * portsPerInstance)); + System.out.println("Unique ports allocated: " + portAllocationCount.size()); + + List collidedPorts = new ArrayList<>(); + int totalCollisions = 0; + + for (Map.Entry entry : portAllocationCount.entrySet()) { + int count = entry.getValue().get(); + if (count > 1) { + collidedPorts.add(entry.getKey()); + totalCollisions += (count - 1); + } + } + + System.out.println("Ports with collisions: " + collidedPorts.size()); + System.out.println("Total collision instances: " + totalCollisions); + + if (!collidedPorts.isEmpty()) { + System.out.println("\n❌ COLLISIONS DETECTED - Showing top colliders:"); + portAllocationCount.entrySet().stream() + .filter(e -> e.getValue().get() > 1) + .sorted((a, b) -> b.getValue().get() - a.getValue().get()) + .limit(20) + .forEach(e -> System.out.println( + " Port " + e.getKey() + " allocated " + e.getValue().get() + " times")); + System.out.println( + "\nThis is the BUG! Each UniquePortSupplier instance has its own usedPorts HashSet."); + System.out.println( + "Multiple instances can allocate the same port because they don't coordinate."); + System.out + .println("The fix uses static GLOBAL_USED_PORTS to coordinate across all instances."); + } else { + System.out.println("\n✓ SUCCESS: No collisions - all ports unique"); + System.out + .println("The fix is working: static GLOBAL_USED_PORTS coordinates across instances."); + } + System.out.println("========================================"); + + // This assertion documents the EXPECTED behavior with/without fix: + // WITHOUT FIX: This WILL fail because collisions occur with constrained port range + // WITH FIX: This WILL pass because GLOBAL_USED_PORTS prevents collisions + assertThat(collidedPorts) + .as("No port should be allocated more than once (proves fix necessity)") + .isEmpty(); + + } finally { + executor.shutdownNow(); + executor.awaitTermination(5, TimeUnit.SECONDS); + } + } +} diff --git a/geode-junit/src/main/java/org/apache/geode/internal/AvailablePortHelper.java b/geode-junit/src/main/java/org/apache/geode/internal/AvailablePortHelper.java index 6e5dfc6c6cd5..54c7cebcaab7 100644 --- a/geode-junit/src/main/java/org/apache/geode/internal/AvailablePortHelper.java +++ b/geode-junit/src/main/java/org/apache/geode/internal/AvailablePortHelper.java @@ -141,7 +141,11 @@ private static int availablePort(int protocol) { } if (isPortAvailable(port, protocol, getAddress(protocol))) { - return port; + // Coordinate with UniquePortSupplier to prevent port collision in parallel tests + if (UniquePortSupplier.tryClaimPort(port)) { + return port; + } + // Port was already claimed by another parallel test, try next port } } } diff --git a/geode-junit/src/main/java/org/apache/geode/internal/UniquePortSupplier.java b/geode-junit/src/main/java/org/apache/geode/internal/UniquePortSupplier.java index 85ca51b41d80..3270cc54a6ee 100644 --- a/geode-junit/src/main/java/org/apache/geode/internal/UniquePortSupplier.java +++ b/geode-junit/src/main/java/org/apache/geode/internal/UniquePortSupplier.java @@ -14,18 +14,23 @@ */ package org.apache.geode.internal; -import java.util.HashSet; + import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import java.util.function.IntSupplier; -import java.util.stream.IntStream; /** - * Supplies unique ports that have not already been supplied by this instance of PortSupplier + * Supplies unique ports that have not already been supplied by any instance of PortSupplier. + * Uses a static shared set to coordinate port allocation across all test classes running in + * parallel, preventing port collisions in highly parallel test environments. */ public class UniquePortSupplier { + // Static shared set to prevent port collisions across all UniquePortSupplier instances + // in parallel test execution (e.g., CI with --max-workers=12) + private static final Set GLOBAL_USED_PORTS = ConcurrentHashMap.newKeySet(); + private final IntSupplier supplier; - private final Set usedPorts = new HashSet<>(); public UniquePortSupplier() { supplier = AvailablePortHelper::getRandomAvailableTCPPort; @@ -35,13 +40,35 @@ public UniquePortSupplier(IntSupplier supplier) { this.supplier = supplier; } - public synchronized int getAvailablePort() { - int result = IntStream.generate(supplier) - .filter(port -> !usedPorts.contains(port)) - .findFirst() - .getAsInt(); + public int getAvailablePort() { + // Keep trying until we successfully claim a port that hasn't been claimed by another instance + while (true) { + int port = supplier.getAsInt(); + + // Atomically add only if not already present + if (GLOBAL_USED_PORTS.add(port)) { + return port; + } + // If add returned false, port was already claimed by another instance, try again + } + } + + /** + * Clears the global cache of used ports. This is primarily for testing purposes to ensure + * clean state between test runs. + */ + static void clearGlobalCache() { + GLOBAL_USED_PORTS.clear(); + } - usedPorts.add(result); - return result; + /** + * Try to claim a port in the global cache. Returns true if the port was successfully claimed + * (wasn't already in use), false otherwise. + * + * @param port the port to claim + * @return true if successfully claimed, false if already in use + */ + static boolean tryClaimPort(int port) { + return GLOBAL_USED_PORTS.add(port); } } diff --git a/geode-junit/src/test/resources/expected-pom.xml b/geode-junit/src/test/resources/expected-pom.xml index 2c6a64729c78..6464f6801c77 100644 --- a/geode-junit/src/test/resources/expected-pom.xml +++ b/geode-junit/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-junit @@ -52,12 +36,12 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j - hamcrest * + hamcrest @@ -67,8 +51,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -78,8 +62,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -89,8 +73,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -100,8 +84,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -111,8 +95,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -122,8 +106,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -133,8 +117,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -144,8 +128,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -155,12 +139,12 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j - junit-dep * + junit-dep @@ -170,8 +154,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -181,8 +165,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -192,8 +176,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -203,8 +187,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -214,8 +198,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -225,8 +209,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -236,8 +220,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -247,8 +231,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -258,8 +242,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -269,8 +253,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -280,8 +264,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -291,8 +275,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-log4j/src/test/resources/expected-pom.xml b/geode-log4j/src/test/resources/expected-pom.xml index 1dd30357b2a9..1ca4443f0384 100644 --- a/geode-log4j/src/test/resources/expected-pom.xml +++ b/geode-log4j/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-log4j @@ -52,8 +36,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -96,8 +80,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -107,12 +91,12 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j - slf4j-api * + slf4j-api true @@ -123,8 +107,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j true @@ -135,8 +119,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j true diff --git a/geode-logging/src/test/resources/expected-pom.xml b/geode-logging/src/test/resources/expected-pom.xml index b2528f6ba474..715a10de2f69 100644 --- a/geode-logging/src/test/resources/expected-pom.xml +++ b/geode-logging/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-logging @@ -52,8 +36,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-lucene/src/test/resources/expected-pom.xml b/geode-lucene/src/test/resources/expected-pom.xml index 4899bb2f4fef..09ab6967fa1f 100644 --- a/geode-lucene/src/test/resources/expected-pom.xml +++ b/geode-lucene/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-lucene @@ -52,8 +36,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -96,8 +80,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -107,8 +91,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -118,8 +102,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -129,12 +113,12 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j - lucene-sandbox * + lucene-sandbox @@ -144,8 +128,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -155,8 +139,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -166,8 +150,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -177,8 +161,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -188,8 +172,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-management/src/test/resources/expected-pom.xml b/geode-management/src/test/resources/expected-pom.xml index 738c52522175..b78fda2bf8df 100644 --- a/geode-management/src/test/resources/expected-pom.xml +++ b/geode-management/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-management @@ -52,8 +36,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -96,8 +80,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -107,8 +91,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -118,8 +102,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -129,8 +113,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -140,8 +124,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-membership/src/test/resources/expected-pom.xml b/geode-membership/src/test/resources/expected-pom.xml index 3fd2e3cf4e3c..46fdc547cced 100644 --- a/geode-membership/src/test/resources/expected-pom.xml +++ b/geode-membership/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-membership @@ -52,8 +36,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -96,8 +80,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -107,8 +91,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -118,8 +102,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -129,8 +113,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -140,8 +124,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-memcached/src/test/resources/expected-pom.xml b/geode-memcached/src/test/resources/expected-pom.xml index b9ea313d1ed7..af69026e9c41 100644 --- a/geode-memcached/src/test/resources/expected-pom.xml +++ b/geode-memcached/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-memcached @@ -52,8 +36,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-old-client-support/src/test/resources/expected-pom.xml b/geode-old-client-support/src/test/resources/expected-pom.xml index 4b50e9620ae0..b85b5ef8ba40 100644 --- a/geode-old-client-support/src/test/resources/expected-pom.xml +++ b/geode-old-client-support/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-old-client-support @@ -52,8 +36,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-rebalancer/src/test/resources/expected-pom.xml b/geode-rebalancer/src/test/resources/expected-pom.xml index 2d94a9365349..8ffa6255bfb7 100644 --- a/geode-rebalancer/src/test/resources/expected-pom.xml +++ b/geode-rebalancer/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-rebalancer @@ -52,8 +36,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -96,20 +80,20 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j - spring-beans * + spring-beans - spring-expression * + spring-expression - spring-aop * + spring-aop diff --git a/geode-serialization/src/test/resources/expected-pom.xml b/geode-serialization/src/test/resources/expected-pom.xml index 719336ecdbab..2083e29996d4 100644 --- a/geode-serialization/src/test/resources/expected-pom.xml +++ b/geode-serialization/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-serialization @@ -52,8 +36,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -96,8 +80,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-server-all/src/test/resources/expected-pom.xml b/geode-server-all/src/test/resources/expected-pom.xml index 7c572939f7a7..77365dbdf7fd 100644 --- a/geode-server-all/src/test/resources/expected-pom.xml +++ b/geode-server-all/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-server-all @@ -52,8 +36,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -96,8 +80,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -107,8 +91,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -118,8 +102,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -129,8 +113,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -140,8 +124,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -151,8 +135,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -162,8 +146,8 @@ compile - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -173,8 +157,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -184,8 +168,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -195,8 +179,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -206,8 +190,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -217,8 +201,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -228,8 +212,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -239,8 +223,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -250,8 +234,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-tcp-server/src/test/resources/expected-pom.xml b/geode-tcp-server/src/test/resources/expected-pom.xml index e8b3e583a3b8..efe173776180 100644 --- a/geode-tcp-server/src/test/resources/expected-pom.xml +++ b/geode-tcp-server/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-tcp-server @@ -52,8 +36,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -96,8 +80,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/geode-unsafe/src/test/resources/expected-pom.xml b/geode-unsafe/src/test/resources/expected-pom.xml index a5533e9a7c87..e490032e4565 100644 --- a/geode-unsafe/src/test/resources/expected-pom.xml +++ b/geode-unsafe/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - - + 4.0.0 org.apache.geode geode-unsafe diff --git a/geode-wan/src/test/resources/expected-pom.xml b/geode-wan/src/test/resources/expected-pom.xml index cfc6b77738da..07c15d1ffc71 100644 --- a/geode-wan/src/test/resources/expected-pom.xml +++ b/geode-wan/src/test/resources/expected-pom.xml @@ -1,21 +1,5 @@ - 4.0.0 org.apache.geode geode-wan @@ -52,8 +36,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -63,8 +47,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -74,8 +58,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -85,8 +69,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -96,8 +80,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -107,8 +91,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j @@ -118,8 +102,8 @@ runtime - log4j-to-slf4j org.apache.logging.log4j + log4j-to-slf4j diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cbfa754..41d9927a4d4f 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 70d977784219..ff487394a4e2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.6-bin.zip +distributionSha256Sum=673d9776f303bc7048fc3329d232d6ebf1051b07893bd9d11616fad9a8673be0 networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68d65c8..1b6c787337ff 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,11 +80,11 @@ do esac done -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' @@ -143,16 +143,12 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -209,12 +205,6 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed.