Use different method to obtain console log.
package io.jenkins.plugins.analysis.core.testutil;
+import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
+import java.io.Reader;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
@@ -802,7 +804,10 @@ public abstract class IntegrationTest extends ResourceTest {
ResultAction action = getResultAction(run);
System.out.println("---------------------------------- Console Log ---------------------------------");
- System.out.println(JenkinsRule.getLog(run));
+ System.out.println("---------------------------------- Console Log ---------------------------------");
+ try (Reader reader = run.getLogReader()) {
+ new BufferedReader(reader).lines().forEach(System.out::println);
+ }
System.out.println("------------------------------------- Infos ------------------------------------");
action.getResult().getInfoMessages().forEach(System.out::println);
System.out.println("------------------------------------ Errors ------------------------------------");
