reta commented on code in PR #2919:
URL: https://github.com/apache/cxf/pull/2919#discussion_r2886510528
##########
systests/rs-sse/rs-sse-base/src/main/java/org/apache/cxf/systest/jaxrs/sse/AbstractSseTest.java:
##########
@@ -408,6 +415,47 @@ public void testBooksSseContainerResponseAddedHeaders()
throws InterruptedExcept
assertThat(response.getHeaderString("X-My-ProtocolHeader"),
equalTo("protocol-headers"));
}
}
+
+
+ private static String captureStdoutDuring(Callable<?> action) throws
Exception {
+ PrintStream oldOut = System.out;
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ PrintStream ps = new PrintStream(baos, true,
StandardCharsets.UTF_8.name());
+ System.setOut(ps);
+ try {
+ action.call();
+ // give async logger a moment *before restoring*
+ Thread.sleep(1000);
Review Comment:
I am wondering if we could use more reliable way to capture logs, in memory
appender fe or alike, Thead.sleep has proven to be very unstable. Could also
look into it in a fea days (sorry, on vacation now), thanks @ffang
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]