Skip to content

Commit

Permalink
arquillian/appclient wip progress logging changes
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Marlow <[email protected]>
  • Loading branch information
scottmarlow committed Nov 12, 2024
1 parent b3ba061 commit 2ac1ed6
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,17 @@ 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();
if (config.isRunClient()) {
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) {
Expand All @@ -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;
Expand Down Expand Up @@ -117,6 +119,7 @@ public TestResult invoke(TestMethodExecutor testMethodExecutor) {
break;
}
result.addDescription(description);
log.info(result.toString() + ": " + description + ": " + vehicleArchiveName + ": " + appArchiveName);
}

return result;
Expand Down

0 comments on commit 2ac1ed6

Please sign in to comment.