Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ public void testInputStreamReads() throws IOException, InterruptedException {
// reading past the end
int eof = is.read(buf, 0, 1);
assertWithMessage("EOF should return -1").that(eof).isEqualTo(-1);
} finally {
// clean up
Files.delete(p);
}
}
}
Expand Down Expand Up @@ -121,6 +124,9 @@ public void testChannelReads() throws IOException, InterruptedException {
buf.clear();
int eof = chan.read(buf);
assertWithMessage("EOF should return -1").that(eof).isEqualTo(-1);
} finally {
// clean up
Files.delete(p);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,10 @@ public void testListFiles() throws IOException {
got.add(path);
}
assertThat(got).containsExactlyElementsIn(goodPaths);
// clean up
for (Path path : paths) {
Files.delete(path);
}
}
}

Expand All @@ -552,10 +556,12 @@ public void testDeleteRecursive() throws IOException {

@Test
public void testListFilesInRootDirectory() throws IOException {
// We must explicitly set the storageOptions, because the unit tests
// set the fake storage as default but we want to access the real storage.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

CloudStorageFileSystem fs = CloudStorageFileSystem.forBucket(
BUCKET, CloudStorageConfiguration.builder().permitEmptyPathComponents(true)
.build());
.build(), storageOptions);

// test absolute path
Path rootPath = fs.getPath("");
List<String> objectNames = new ArrayList<String>();
Expand Down