Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
9fc566f
GEODE-10490: Upgrade Gradle from 7.3.3 to 7.6.6
JinwooHwang Sep 29, 2025
d6e029b
GEODE-10490: Add SHA256 checksum verification to Gradle wrapper for s…
JinwooHwang Sep 29, 2025
5fe0f72
GEODE-10490: Update expected POM files for CI environment compatibility
JinwooHwang Sep 29, 2025
5c3a0ea
GEODE-10490: Implement configurable port partitioning to prevent test…
JinwooHwang Sep 30, 2025
cb89445
GEODE-10490: Set default port partition size to 50 for integration tests
JinwooHwang Sep 30, 2025
e268397
Increase port partition size to 200
JinwooHwang Oct 1, 2025
a2f698d
Revert "GEODE-10490: Implement configurable port partitioning to prev…
JinwooHwang Oct 1, 2025
50c3836
GEODE-10498: Fix file system element parameter 'source' failing in ex…
JinwooHwang Oct 1, 2025
f3aaddd
Merge develop into feature/GEODE-10490
JinwooHwang Nov 14, 2025
40b1f7b
Fix POM generation for Gradle 7.6.6 compatibility
JinwooHwang Nov 14, 2025
7dfeef7
GEODE-10490: Fix port collision in parallel tests with static global …
JinwooHwang Nov 15, 2025
648f542
GEODE-10490: Add Keeper pattern to eliminate TOCTOU race in port allo…
JinwooHwang Nov 16, 2025
3f2dd7b
GEODE-10490: Use Keeper pattern in AvailablePortHelper to reduce TOCT…
JinwooHwang Nov 16, 2025
1cdde5e
GEODE-10490: Hold port Keepers until binding to eliminate TOCTOU race
JinwooHwang Nov 16, 2025
01ca1bc
Revert GEODE-10490: Remove Keeper pattern - causes OS port release ti…
JinwooHwang Nov 16, 2025
39e0657
GEODE-10490: Complete Keeper revert and add port coordination fix
JinwooHwang Nov 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -72,21 +73,24 @@ public class RepeatTestExecuter implements TestExecuter<JvmTestExecutionSpec> {
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;
private final DefaultTestFilter testFilter;
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;
Expand All @@ -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<File> classpath = ImmutableSet.copyOf(testExecutionSpec.getClasspath());
final Set<File> modulePath = ImmutableSet.copyOf(testExecutionSpec.getModulePath());
final List<String>
testWorkerImplementationModules =
testFramework.getTestWorkerImplementationModules();
final Factory<TestClassProcessor> 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);
Expand Down Expand Up @@ -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();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -40,7 +42,7 @@ class Workers {
workerImplementationFactory.gradleUserHomeDir,
workerImplementationFactory.temporaryFileProvider,
donor.execHandleFactory,
workerImplementationFactory.jvmVersionDetector,
jvmVersionDetector,
donor.outputEventListener,
donor.memoryManager,
processLauncher)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
5 changes: 4 additions & 1 deletion build-tools/scripts/src/main/groovy/check-pom.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
}
Expand Down
20 changes: 14 additions & 6 deletions build-tools/scripts/src/main/groovy/geode-publish-common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<!--
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.
-->
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.geode</groupId>
<artifactId>geode-modules-tomcat10</artifactId>
Expand Down Expand Up @@ -52,8 +36,8 @@
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand All @@ -63,8 +47,8 @@
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand Down
30 changes: 7 additions & 23 deletions extensions/geode-modules/src/test/resources/expected-pom.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<!--
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.
-->
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.geode</groupId>
<artifactId>geode-modules</artifactId>
Expand Down Expand Up @@ -52,8 +36,8 @@
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand All @@ -63,8 +47,8 @@
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand All @@ -74,8 +58,8 @@
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand All @@ -85,8 +69,8 @@
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand All @@ -96,8 +80,8 @@
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand All @@ -107,8 +91,8 @@
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand All @@ -118,8 +102,8 @@
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public void uncheckedCast_rawList_wrongTypes() {
List<String> 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);
Expand Down
22 changes: 3 additions & 19 deletions geode-common/src/test/resources/expected-pom.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<!--
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.
-->
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.geode</groupId>
<artifactId>geode-common</artifactId>
Expand Down Expand Up @@ -52,8 +36,8 @@
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand All @@ -63,8 +47,8 @@
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand All @@ -74,8 +58,8 @@
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand Down
20 changes: 2 additions & 18 deletions geode-concurrency-test/src/test/resources/expected-pom.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<!--
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.
-->
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.geode</groupId>
<artifactId>geode-concurrency-test</artifactId>
Expand Down Expand Up @@ -52,8 +36,8 @@
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand All @@ -63,8 +47,8 @@
<scope>runtime</scope>
<exclusions>
<exclusion>
<artifactId>log4j-to-slf4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand Down
Loading
Loading