Skip to content

Commit 9294c04

Browse files
committed
Allow for subpaths
1 parent 08d2a76 commit 9294c04

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/framework/src/main/java/org/elasticsearch/cluster/DiskUsageIntegTestCase.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,12 @@ public FileStore getFileStore(Path path) {
218218
}
219219

220220
TestFileStore getTestFileStore(Path path) {
221-
final TestFileStore fileStore = trackedPaths.get(path);
221+
final TestFileStore fileStore = trackedPaths.entrySet()
222+
.stream()
223+
.filter(e -> path.startsWith(e.getKey()))
224+
.map(Map.Entry::getValue)
225+
.findAny()
226+
.orElse(null);
222227
if (fileStore != null) {
223228
return fileStore;
224229
}

0 commit comments

Comments
 (0)