Skip to content

Commit 2c0b6d6

Browse files
committed
Improving integration test
1 parent 1f72a65 commit 2c0b6d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/org/cryptomator/cryptofs/DeleteNonEmptyCiphertextDirectoryIntegrationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ private Path firstEmptyCiphertextDirectory() throws IOException {
171171
private boolean isEmptyCryptoFsDirectory(Path path) {
172172
Predicate<Path> isIgnoredFile = p -> Constants.DIR_ID_FILE.equals(p.getFileName().toString());
173173
try (Stream<Path> files = Files.list(path)) {
174-
return files.noneMatch(isIgnoredFile.negate());
174+
return files.filter(isIgnoredFile.negate()).findFirst().isEmpty();
175175
} catch (IOException e) {
176176
throw new UncheckedIOException(e);
177177
}
@@ -187,7 +187,7 @@ public void testCryptoFsDirEmptiness() throws IOException {
187187

188188
boolean result = isEmptyCryptoFsDirectory(emptiness);
189189

190-
Assertions.assertTrue(result, "Directory containing only dir id file is not considered empty");
190+
Assertions.assertTrue(result, "Ciphertext directory containing only dirId-file should be accepted as an empty dir");
191191
}
192192

193193
private boolean isEncryptedDirectory(Path pathInVault) {

0 commit comments

Comments
 (0)