Skip to content

Commit 9ee351a

Browse files
committed
Flaky test reporter: don't parse empty files
1 parent c0db6ba commit 9ee351a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test-report/src/main/java/io/opentelemetry/instrumentation/testreport/FlakyTestReporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ private void scanTestResults(Path buildDir) throws IOException {
201201
@Override
202202
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
203203
String name = file.getFileName().toString();
204-
if (name.startsWith("TEST-") && name.endsWith(".xml")) {
204+
if (name.startsWith("TEST-") && name.endsWith(".xml") && file.toFile().length() > 0) {
205205
scanTestFile(file);
206206
}
207207

0 commit comments

Comments
 (0)