Migrate JGroups unit tests from Ant+TestNG to Maven Surefire+TestNG - #1040
Open
akbar1214 wants to merge 6 commits into
Open
Migrate JGroups unit tests from Ant+TestNG to Maven Surefire+TestNG#1040akbar1214 wants to merge 6 commits into
akbar1214 wants to merge 6 commits into
Conversation
Create 12 TestNG suite files under src/test/resources/testng/ matching the Ant test suite configurations: - functional, encrypt, byteman, jdbc, stack-independent, time-sensitive - udp, udp-new, tcp, tcp-new, tcp-nio, tcp-nio-new
Add a maven-antrun-plugin execution that runs the existing Ant make-keystore target during the initialize phase. This ensures the keystore/ directory is created before tests run, matching the Ant build behavior without changing the test execution logic.
Configure maven-surefire-plugin with 12 self-contained executions that mirror the Ant test suite definitions (functional, encrypt, byteman, jdbc, stack-independent, time-sensitive, udp, udp-new, tcp, tcp-new, tcp-nio, tcp-nio-new). Each execution specifies its own TestNG suite XML, groups, thread count, port ranges, and JVM arguments. The channel.conf parameter is passed via TestNG <parameter> so it is picked up by @parameters in ChannelTestBase. Also: - Remove the <systemPropertiesFile>build.properties</systemPropertiesFile> dependency and inline test properties in each execution. - Add tests/util as a test source so JUnitXMLReporter is available on the Surefire classpath.
- Replaced maven-antrun-plugin with exec-maven-plugin and maven-resources-plugin for XML schema generation and XSD handling - XMLSchemaGenerator now creates output directories when missing - Suppressed the default Surefire default-test execution so mvn test only runs the 12 defined TestNG suite executions - Removed maven-antrun-plugin from pluginManagement - Updated migration documentation
Owner
|
Hi Akbar |
Collaborator
|
Letting CI run in the meantime - but note this does not actually run the tests. |
Contributor
Author
|
@belaban by any chance did you get time to look into this ? |
Owner
|
Not yet, it's on my todo list... |
Owner
|
I took a quick look: It is almost as if the |
Owner
|
This surefire output (HTML file) looks hideous! Is there a way to get output from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR migrates JGroups unit test execution from the Ant-based TestNG runner to Maven Surefire + TestNG, while keeping the existing directory structure and Ant build intact.
What changed
Added a byteman.version property and centralized both byteman and byteman-bmunit dependencies on it.
Added 12 TestNG XML suite files under src/test/resources/testng/, mirroring the existing Ant suites:
functional, encrypt, byteman, jdbc, stack-independent, time-sensitive, udp, udp-new, tcp, tcp-new, tcp-nio, tcp-nio-new
Each suite defines the correct groups, exclusions, parallelism, thread count, and channel.conf parameter where needed.
Surefire configuration
Removed maven-antrun-plugin
How to run
mvn test # all suites sequentially (ant target
all-testsdidn't run jdbc which is bit different currently)mvn surefire:test@ # single suite, e.g. functional, encrypt
Part of JGRP-2499