diff --git a/server/src/test/java/org/elasticsearch/ExceptionSerializationTests.java b/server/src/test/java/org/elasticsearch/ExceptionSerializationTests.java index 5c8c25cbfddfe..62778af8d577c 100644 --- a/server/src/test/java/org/elasticsearch/ExceptionSerializationTests.java +++ b/server/src/test/java/org/elasticsearch/ExceptionSerializationTests.java @@ -133,11 +133,7 @@ public void testExceptionRegistration() @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { - Path next = pkgPrefix.resolve(dir.getFileName()); - if (ignore.contains(next)) { - return FileVisitResult.SKIP_SUBTREE; - } - pkgPrefix = next; + pkgPrefix = pkgPrefix.resolve(dir.getFileName()); return FileVisitResult.CONTINUE; }