diff --git a/itest/src/edu/stanford/nlp/dcoref/DcorefBenchmarkSlowITest.java b/itest/src/edu/stanford/nlp/dcoref/DcorefBenchmarkSlowITest.java index e3b6dc31a6..3eaafd501d 100644 --- a/itest/src/edu/stanford/nlp/dcoref/DcorefBenchmarkSlowITest.java +++ b/itest/src/edu/stanford/nlp/dcoref/DcorefBenchmarkSlowITest.java @@ -6,6 +6,7 @@ import java.io.File; import java.io.IOException; import java.io.StringReader; +import java.util.List; import java.util.Properties; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -130,6 +131,14 @@ public static Counter getCorefResults(String resultsString) throws IOExc } } + if (results.keySet().isEmpty()) { + List lines = StringUtils.split(resultsString, "\\R"); + int start = Math.max(0, lines.size() - 20); + lines = lines.subList(start, lines.size() - start); + String tail = StringUtils.join(lines, "\n"); + throw new RuntimeException("Coref output did not have any results in it! The end of the log is as follows:\n" + tail); + } + return results; }