Skip to content

[Issue-3380] Send sourceQualifiedName to forked clients (#3380) - #3381

Merged
olamy merged 2 commits into
apache:masterfrom
fabriciorby:fix-forked-qualified-name
Jun 30, 2026
Merged

olamy merged 2 commits into
apache:masterfrom
fabriciorby:fix-forked-qualified-name

Conversation

@fabriciorby

@fabriciorby fabriciorby commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

The sourceQualifiedName should also be sent to forked clients, so it's added on ForkClient, the EventChannelEncoder and EventDecoder.

It should also be used in the CategorizedReportEntry and implemented properly in WrappedReportEntry.

Check #3380 and #3203

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean install to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its clean install).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

The sourceQualifiedName should also be sent to forked clients, so it's added on ForkClient, the EventChannelEncoder and EventDecoder.

It should also be used in the CategorizedReportEntry and implemented properly in WrappedReportEntry.
@fabriciorby

Copy link
Copy Markdown
Contributor Author

To run the integration tests I had to change the pom.xml to scope test in surefire-its

    <dependency>
      <groupId>org.apache.maven.surefire</groupId>
      <artifactId>surefire-report-parser</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.surefire</groupId>
      <artifactId>surefire-logger-api</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>

@olamy

olamy commented Jun 20, 2026

Copy link
Copy Markdown
Member

@fabriciorby Thanks!
Could we imagine an IT test to ensure we capture this change?

@olamy olamy added the enhancement New feature or request label Jun 20, 2026
@olamy olamy linked an issue Jun 20, 2026 that may be closed by this pull request
@olamy olamy added this to the 3.6.0-M2 milestone Jun 20, 2026
@fabriciorby

fabriciorby commented Jun 20, 2026 •

Copy link
Copy Markdown
Contributor Author

@olamy I am having too many issues with dependency errors when running the integration tests in my local, so I think the current implementation is enough and I won't go further.

The strategy I got is that the current only possible way of testing this is by relying on the behaviour of this line in StatelessXmlReporter.java so I need to play with phrasedClassName=false in the pom.xml and then basically if original.getSourceQualifiedName() is not null (passed correctly through encode/decode with ForkClient) it should not bring the original.getSourceText(). Which means it should never bring the @DisplayName value.

@fabriciorby

Copy link
Copy Markdown
Contributor Author

do I need to sign this Individual Contributor License Agreement?

@olamy

olamy commented Jun 24, 2026

Copy link
Copy Markdown
Member

I am having too many issues with dependency errors when running the integration tests in my local,

not at all.

I wonder what you mean by?

I am having too many issues with dependency errors when running the integration tests in my local,

@fabriciorby

Copy link
Copy Markdown
Contributor Author

I wonder what you mean by?

I am having too many issues with dependency errors when running the integration tests in my local,

I was getting some random errors while developing, sometimes during test execution that could not find ConsoleLogger, etc.

I was running mvn -Prun-its clean install -Drat.skip=true

[INFO] Reactor Summary for Apache Maven Surefire 3.6.0-M2-SNAPSHOT:
[INFO] 
[INFO] Apache Maven Surefire .............................. SUCCESS [  1.422 s]
[INFO] Surefire Shared Utils .............................. SUCCESS [  0.884 s]
[INFO] Surefire Logger API ................................ SUCCESS [  2.209 s]
[INFO] Surefire API ....................................... SUCCESS [ 11.259 s]
[INFO] Surefire Extensions API ............................ SUCCESS [  1.668 s]
[INFO] Surefire Extensions SPI ............................ SUCCESS [  0.400 s]
[INFO] Surefire Booter .................................... SUCCESS [  4.960 s]
[INFO] Surefire Providers ................................. SUCCESS [  0.133 s]
[INFO] Shared Java 5 Provider Base ........................ SUCCESS [  1.489 s]
[INFO] Surefire JUnit Platform Runner ..................... SUCCESS [  3.011 s]
[INFO] ShadeFire JUnit5 Provider .......................... SUCCESS [  0.531 s]
[INFO] Maven Surefire Common .............................. SUCCESS [ 18.025 s]
[INFO] Surefire Report Parser ............................. SUCCESS [  1.970 s]
[INFO] Maven Surefire Plugin .............................. SUCCESS [  2.350 s]
[INFO] Maven Failsafe Plugin .............................. SUCCESS [ 19.671 s]
[INFO] Maven Surefire Report Plugin ....................... SUCCESS [  4.629 s]
[INFO] Maven Surefire Integration Tests ................... FAILURE [  3.879 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:18 min
[INFO] Finished at: 2026-06-24T21:57:07+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:3.5.5:integration-test (default) on project surefire-its: Execution default of goal org.apache.maven.plugins:maven-failsafe-plugin:3.5.5:integration-test failed: java.lang.RuntimeException: Unable to create test class 'org.apache.maven.surefire.its.TestMultipleMethodPatternsTestNGIncludesExcludesIT' -> [Help 1]                                                                                                                                                                                                                                                                                                                                                              
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :surefire-its

@olamy

olamy commented Jun 25, 2026

Copy link
Copy Markdown
Member

@fabriciorby doh that's interesting.
Can you run with -e and what mvn -v says?

@fabriciorby

Copy link
Copy Markdown
Contributor Author

@fabriciorby doh that's interesting. Can you run with -e and what mvn -v says?

now everything is running fine and it seems I cannot trigger the error I was getting before, which is great

@olamy
olamy merged commit 523e1ce into apache:master Jun 30, 2026
14 checks passed
@olamy

olamy commented Jun 30, 2026

Copy link
Copy Markdown
Member

@fabriciorby Thanks for your contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Send sourceQualifiedName to forked clients

2 participants