-
-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
Description
During PD it can be very helpful to see what happens with a test when it passes, particularly when wanting to compare differing passing/failing between different JVMs, JDK levels etc ...
Currently, the framework only outputs from failing tests.
The following "hack" was utilised during such PD efforts with a load test recently ...
diff --git a/stf.load/src/stf.load/net/adoptopenjdk/loadTest/LoadTestRunner.java b/stf.load/src/stf.load/net/adoptopenjdk/loadTest/LoadTestRunner.java
index 6acc040..e46286c 100644
--- a/stf.load/src/stf.load/net/adoptopenjdk/loadTest/LoadTestRunner.java
+++ b/stf.load/src/stf.load/net/adoptopenjdk/loadTest/LoadTestRunner.java
@@ -201,6 +201,9 @@ class LoadTestRunner {
// Keep in-memory count of pass/fail result
if (testPassed) {
numberPassingTests.incrementAndGet();
+ originalSystemOut.println("BW PASSING TEST >");
+ originalSystemOut.println(new String(executionTracker.getCapturedOutput().toByteArray()));
+ originalSystemOut.println("< BW PASSING TEST");
} else {
// Produce java dumps for only the first test failure if flag for creating dump is set by user
long failureNum = numberFailingTests.incrementAndGet();
@@ -418,4 +421,4 @@ class LoadTestRunner {
return total;
}
-}
\ No newline at end of file
+}
This should be generalised, as necessary for non-load runner testing, and formalised so that it can be controlled through parameters or similar.