-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arquillian/appclient wip progress logging changes #1647
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) { | ||
|
@@ -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); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this might look a little better with something like:
Note I'm not sure how the The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, switching over to this style. I don't think the appclient jar or vehicle names are what I really wanted to show here. Showing the EAR name would be nicer (based on how we current include more information in the ear name). Revising... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will update this to show the new output with:
|
||
} | ||
|
||
return result; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part could end up making it look a little odd if it's already a formatted log line. I also feel this should be at level
fine
notfiner
.