Add socket output support to OpenTestReportGeneratingListener #2
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.
Enables redirecting Open Test Reporting XML events to a socket instead of a file, using the Writer-based API introduced in open-test-reporting 0.2.5.
Configuration
junit.platform.reporting.open.xml.socket=<port>localhost:<port>and streams XML events to the socketImplementation
createDocumentWriter()method checks for socket config and delegates to appropriateEvents.createDocumentWriter()overloadOutputStreamWriterwith UTF-8 encoding for socket outputDocumentWriterlifecycle (closes automatically)Example Usage
# Console Launcher java -jar junit-platform-console-standalone.jar \ --config=junit.platform.reporting.open.xml.enabled=true \ --config=junit.platform.reporting.open.xml.socket=8080Testing
writesXmlReportToSocket()test verifying end-to-end socket outputWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
checkstyle.org/opt/hostedtoolcache/CodeQL/2.23.1/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.23.1/x64/codeql/xml/tools/xml-extractor.jar --fileList=/home/REDACTED/work/junit-framework/.codeql-scratch/dbs/java/working/files-to-index17571054916578602831.list --sourceArchiveDir=/home/REDACTED/work/junit-framework/.codeql-scratch/dbs/java/src --outputDir=/home/REDACTED/work/junit-framework/.codeql-scratch/dbs/java/trap/java(dns block)ge.junit.org/usr/lib/jvm/temurin-25-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --enable-native-access=ALL-UNNAMED -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Xmx1g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-9.1.0-bin/9agqghryom9wkf8r80qlhnts3/gradle-9.1.0/lib/gradle-daemon-main-9.1.0.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-9.1.0-bin/9agqghryom9wkf8r80qlhnts3/gradle-9.1.0/lib/agents/gradle-instrumentation-agent-9.1.0.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 9.1.0(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)junit.org/usr/lib/jvm/temurin-25-jdk-amd64/bin/java @/tmp/options3707181241615664813 -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Djunit.platform.discovery.issue.severity.critical=info -Djunit.platform.execution.dryRun.enabled=false -Djunit.platform.output.capture.stderr=true -Djunit.platform.output.capture.stdout=true -Djunit.platform.reporting.open.xml.enabled=true -Djunit.platform.reporting.open.xml.git.enabled=true -Djunit.platform.reporting.output.dir=/home/REDACTED/work/junit-framework/junit-framework/platform-tests/build/test-results/test/junit-{uniqueNumber} -Dlog4j2.disableJmx=true -Dlog4j2.julLoggerAdapter=org.apache.logging.log4j.jul.CoreLoggerAdapter -Dnet.bytebuddy.experimental=true -Dnet.bytebuddy.safe=true -Xshare:off -javaagent:/home/REDACTED/work/junit-framework/junit-framework/platform-tests/build/tmp/.cache/expanded/zip_27729b840c216bdc69a9315e04b27ab1/jacocoagent.jar=destfile=build/jacoco/test.exec,append=true,inclnolocationclasses=false,dumponexit=true,output=file,jmx=false -javaagent:/home/REDACTED/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/5.20.0/a32f446f38acf636363c5693db6498047731b9e0/mockito-core-5.20.0.jar -Xmx1g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -ea -Dorg.gradle.test.worker=1 com.gradle.enterprise.testdistribution.launcher.forked.LauncherMain 43439(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.