From 2ac1ed61b1e98b00e7b08e906d4156459fcd24d0 Mon Sep 17 00:00:00 2001 From: Scott Marlow Date: Tue, 12 Nov 2024 17:17:17 -0500 Subject: [PATCH 1/2] arquillian/appclient wip progress logging changes Signed-off-by: Scott Marlow --- .../protocol/appclient/AppClientMethodExecutor.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arquillian/appclient/src/main/java/tck/arquillian/protocol/appclient/AppClientMethodExecutor.java b/arquillian/appclient/src/main/java/tck/arquillian/protocol/appclient/AppClientMethodExecutor.java index ec9c0d92bb..e170427413 100644 --- a/arquillian/appclient/src/main/java/tck/arquillian/protocol/appclient/AppClientMethodExecutor.java +++ b/arquillian/appclient/src/main/java/tck/arquillian/protocol/appclient/AppClientMethodExecutor.java @@ -61,6 +61,8 @@ public AppClientMethodExecutor(AppClientCmd appClient, AppClientProtocolConfigur @Override public TestResult invoke(TestMethodExecutor testMethodExecutor) { TestResult result = TestResult.passed(); + String appArchiveName = null; + String vehicleArchiveName = null; // Run the appclient for the test if required String testMethod = testMethodExecutor.getMethodName(); @@ -68,8 +70,8 @@ public TestResult invoke(TestMethodExecutor testMethodExecutor) { log.info("Running appClient for: " + testMethod); try { Deployment deployment = deploymentInstance.get(); - String appArchiveName = appClientArchiveName.get().name(); - String vehicleArchiveName = TsTestPropsBuilder.vehicleArchiveName(deployment); + appArchiveName = appClientArchiveName.get().name(); + vehicleArchiveName = TsTestPropsBuilder.vehicleArchiveName(deployment); String[] additionalAgrs = TsTestPropsBuilder.runArgs(config, deployment, testMethodExecutor); appClient.run(vehicleArchiveName, appArchiveName, additionalAgrs); } catch (Exception ex) { @@ -81,13 +83,13 @@ public TestResult invoke(TestMethodExecutor testMethodExecutor) { } String[] lines = appClient.readAll(config.getClientTimeout()); - log.info(String.format("AppClient(%s) readAll returned %d lines\n", testMethod, lines.length)); + log.fine(String.format("AppClient(%s) readAll returned %d lines\n", testMethod, lines.length)); boolean sawStatus = false; MainStatus status = MainStatus.NOT_RUN; String reason = "None"; String description = "None"; for (String line : lines) { - System.out.println(line); + log.finer(line); if (line.contains("STATUS:")) { sawStatus = true; description = line; @@ -117,6 +119,7 @@ public TestResult invoke(TestMethodExecutor testMethodExecutor) { break; } result.addDescription(description); + log.info(result.toString() + ": " + description + ": " + vehicleArchiveName + ": " + appArchiveName); } return result; From 34a173c459eb3299da9599d8907dd218dfc5518b Mon Sep 17 00:00:00 2001 From: Scott Marlow Date: Fri, 15 Nov 2024 10:12:03 -0500 Subject: [PATCH 2/2] default to harness.log.traceflag=false and show less appclient log output Signed-off-by: Scott Marlow --- .../protocol/appclient/AppClientMethodExecutor.java | 7 ++++--- .../persistence-platform-tck/jakartaeetck/bin/ts.jte | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arquillian/appclient/src/main/java/tck/arquillian/protocol/appclient/AppClientMethodExecutor.java b/arquillian/appclient/src/main/java/tck/arquillian/protocol/appclient/AppClientMethodExecutor.java index e170427413..7e772450b7 100644 --- a/arquillian/appclient/src/main/java/tck/arquillian/protocol/appclient/AppClientMethodExecutor.java +++ b/arquillian/appclient/src/main/java/tck/arquillian/protocol/appclient/AppClientMethodExecutor.java @@ -21,6 +21,7 @@ import tck.arquillian.protocol.common.TsTestPropsBuilder; import java.io.IOException; +import java.util.logging.Level; import java.util.logging.Logger; public class AppClientMethodExecutor implements ContainerMethodExecutor { @@ -67,7 +68,7 @@ public TestResult invoke(TestMethodExecutor testMethodExecutor) { // Run the appclient for the test if required String testMethod = testMethodExecutor.getMethodName(); if (config.isRunClient()) { - log.info("Running appClient for: " + testMethod); + log.fine("Running appClient for: " + testMethod); try { Deployment deployment = deploymentInstance.get(); appArchiveName = appClientArchiveName.get().name(); @@ -79,7 +80,7 @@ public TestResult invoke(TestMethodExecutor testMethodExecutor) { return result; } } else { - log.info("Not running appClient for: " + testMethod); + log.fine("Not running appClient for %s: " + testMethod); } String[] lines = appClient.readAll(config.getClientTimeout()); @@ -119,7 +120,7 @@ public TestResult invoke(TestMethodExecutor testMethodExecutor) { break; } result.addDescription(description); - log.info(result.toString() + ": " + description + ": " + vehicleArchiveName + ": " + appArchiveName); + log.log(Level.FINE, String.format("[%s] %s : %s", result.getStatus(), description, result)); } return result; diff --git a/glassfish-runner/persistence-platform-tck/jakartaeetck/bin/ts.jte b/glassfish-runner/persistence-platform-tck/jakartaeetck/bin/ts.jte index 4794227579..eab2e03a6e 100644 --- a/glassfish-runner/persistence-platform-tck/jakartaeetck/bin/ts.jte +++ b/glassfish-runner/persistence-platform-tck/jakartaeetck/bin/ts.jte @@ -1429,7 +1429,7 @@ optional.tech.packages.to.ignore=jakarta.xml.bind ######################################################################## harness.temp.directory=${ts.home}/tmp harness.log.port=2000 -harness.log.traceflag=true +harness.log.traceflag=false harness.executeMode=0 harness.socket.retry.count=10 harness.log.delayseconds=1