This is an automated email from the ASF dual-hosted git repository.
rzo1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/storm.git
The following commit(s) were added to refs/heads/master by this push:
new 0622642b4 Bump surefire from 3.5.6 to 3.6.0 (#9151)
0622642b4 is described below
commit 0622642b4c1e83b7a9ad216365869f725cf23b26
Author: Richard Zowalla <[email protected]>
AuthorDate: Thu Oct 1 10:36:11 2026 +0200
Bump surefire from 3.5.6 to 3.6.0 (#9151)
* Bump surefire from 3.5.6 to 3.6.0
Surefire 3.6.0 drops the native TestNG provider and runs TestNG through
the JUnit Platform testng-engine, which instantiates test classes during
discovery. Connect to the cluster in a @BeforeClass method instead of a
field initializer, and register the TestNG listener through the
testng.listeners configuration parameter.
* Resolve node1 on the integration test host
storm.yaml points ZooKeeper, Nimbus and DRPC at node1, which does not
resolve on GitHub runners. The tests never noticed because surefire
3.5.6 ran none of the TestNG tests.
---
integration-test/pom.xml | 9 ++++-----
integration-test/run-it.sh | 2 ++
.../test/java/org/apache/storm/st/helper/AbstractTest.java | 13 ++++++++++++-
pom.xml | 2 +-
4 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/integration-test/pom.xml b/integration-test/pom.xml
index 6878b1bae..f9295f1e7 100644
--- a/integration-test/pom.xml
+++ b/integration-test/pom.xml
@@ -101,16 +101,15 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <!-- TestNG provider does not understand the JUnit 5
groups syntax used in the rest of the project, make sure to override it -->
+ <!-- the TestNG tests carry no JUnit 5 tags, so drop the
excluded groups inherited from the root pom -->
<excludedGroups>none</excludedGroups>
<skipTests>${skipTests}</skipTests>
<redirectTestOutputToFile>${redirectTestOutputToFile}</redirectTestOutputToFile>
<argLine>-Xmx1024m</argLine>
<properties>
- <property>
- <name>listener</name>
-
<value>org.apache.storm.st.meta.TestngListener</value>
- </property>
+ <configurationParameters>
+ testng.listeners =
org.apache.storm.st.meta.TestngListener
+ </configurationParameters>
</properties>
<reuseForks>true</reuseForks>
<forkCount>1</forkCount>
diff --git a/integration-test/run-it.sh b/integration-test/run-it.sh
index a411456ff..4043ba289 100755
--- a/integration-test/run-it.sh
+++ b/integration-test/run-it.sh
@@ -76,6 +76,8 @@ echo "Using storm version:" ${STORM_VERSION}
list_storm_processes || true
sudo bash "${SCRIPT_DIR}/config/common.sh"
sudo bash "${SCRIPT_DIR}/config/install-storm.sh" "$storm_binary_zip"
+# storm.yaml points ZooKeeper, Nimbus and DRPC at node1; make it resolve when
the host does not already
+grep -qw node1 /etc/hosts || echo "127.0.0.1 node1" | sudo tee -a /etc/hosts
if [[ "$TRAVIS_JDK_VERSION" == "openjdk11" ]] || [[ "${JDK_VERSION}" == "11" ]]
then
cat "${SCRIPT_DIR}/config/storm-java9.yaml" | sudo tee -a
/usr/share/storm/conf/storm.yaml
diff --git
a/integration-test/src/test/java/org/apache/storm/st/helper/AbstractTest.java
b/integration-test/src/test/java/org/apache/storm/st/helper/AbstractTest.java
index 57c4930d6..3de0c6262 100644
---
a/integration-test/src/test/java/org/apache/storm/st/helper/AbstractTest.java
+++
b/integration-test/src/test/java/org/apache/storm/st/helper/AbstractTest.java
@@ -18,9 +18,20 @@
package org.apache.storm.st.helper;
import org.apache.storm.st.wrapper.StormCluster;
+import org.testng.annotations.BeforeClass;
public abstract class AbstractTest {
- protected final StormCluster cluster = new StormCluster();
+ protected StormCluster cluster;
+
+ /**
+ * Connect in a configuration method rather than a field initializer: the
TestNG engine
+ * instantiates test classes during discovery, before the cluster is
expected to be reachable.
+ */
+ @BeforeClass(alwaysRun = true)
+ public void connectToCluster() {
+ cluster = new StormCluster();
+ }
+
static {
System.setProperty("user.timezone", "UTC");
}
diff --git a/pom.xml b/pom.xml
index 7136af9f5..4bb39882c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -128,7 +128,7 @@
<jakarta.servlet.version>6.1.0</jakarta.servlet.version>
<thrift.version>0.24.0</thrift.version>
<junit.jupiter.version>6.1.3</junit.jupiter.version>
- <surefire.version>3.5.6</surefire.version>
+ <surefire.version>3.6.0</surefire.version>
<awaitility.version>4.3.0</awaitility.version>
<hdrhistogram.version>2.2.2</hdrhistogram.version>
<hamcrest.version>3.0</hamcrest.version>