Skip to content

Commit 92b6a39

Browse files
authored
Flaky test reporter: don't parse empty files (#14780)
1 parent 8553e70 commit 92b6a39

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)