kennknowles commented on code in PR #40109:
URL: https://github.com/apache/beam/pull/40109#discussion_r4168698652
##########
sdks/java/core/src/test/java/org/apache/beam/sdk/io/FileSystemsTest.java:
##########
@@ -337,6 +368,61 @@ public void testMatchNewDirectory() {
}
}
+ private static class FakeFileSystem extends FileSystem<ResourceId> {
+ private final String scheme;
+ private final MatchResult matchResult;
+
+ FakeFileSystem(String scheme, MatchResult matchResult) {
+ this.scheme = scheme;
+ this.matchResult = matchResult;
+ }
+
+ @Override
+ protected List<MatchResult> match(List<String> specs) {
+ // Return the predefined MatchResult for every spec requested
+ return specs.stream().map(spec ->
matchResult).collect(java.util.stream.Collectors.toList());
Review Comment:
This is the same as `return ImmutableList.of(matchResult)`, no?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]