From 30ef955e343228fe22114f9d4befe533aea181b3 Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Tue, 21 Dec 2021 21:37:53 +0000 Subject: [PATCH] Add override for #getFailedTests() (#19) --- .../AbstractRealtimeTestResultAction.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/org/jenkinsci/plugins/junitrealtimetestreporter/AbstractRealtimeTestResultAction.java b/src/main/java/org/jenkinsci/plugins/junitrealtimetestreporter/AbstractRealtimeTestResultAction.java index fed5fff..784c78b 100644 --- a/src/main/java/org/jenkinsci/plugins/junitrealtimetestreporter/AbstractRealtimeTestResultAction.java +++ b/src/main/java/org/jenkinsci/plugins/junitrealtimetestreporter/AbstractRealtimeTestResultAction.java @@ -29,6 +29,8 @@ import hudson.tasks.junit.TestResult; import hudson.tasks.test.AbstractTestResultAction; import java.io.IOException; +import java.util.Collections; +import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import org.kohsuke.stapler.HttpRedirect; @@ -88,6 +90,15 @@ public int getFailCount() { return getResult().getFailCount(); } + @Override + public List getFailedTests() { + if (getResult() == null) { + return Collections.emptyList(); + } + + return getResult().getFailedTests(); + } + @Override public int getTotalCount() { if (getResult() == null) {