Skip to content

Commit

Permalink
test: fixed 17050 swirlds-merkledb:timingSensitive (#17051)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Kuzmin <alex.kuzmin@swirldslabs.com>
  • Loading branch information
alex-kuzmin-hg authored Dec 13, 2024
1 parent 9a350d8 commit e20b66a
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -679,14 +679,15 @@ void mergeWorksAfterOpen(final FilesTestType testType) throws Exception {
fileCompactor.compactFiles(storedOffsets, fileCollection2.getAllCompletedFiles(), 1);
// check 1 files were opened and data is correct
assertSame(1, fileCollection2.getAllCompletedFiles().size(), "Should be 1 files");
try (Stream<Path> list = Files.list(dbDir)) {
assertEquals(
1,
list.filter(file -> file.getFileName().toString().matches(storeName + ".*pbj"))
.filter(f -> !f.toString().contains("metadata"))
.count(),
"expected 1 db files but had [" + Arrays.toString(list.toArray()) + "]");
}
assertEquals(
1,
Files.list(dbDir)
.filter(file -> file.getFileName().toString().matches(storeName + ".*pbj"))
.filter(f -> !f.toString().contains("metadata"))
.count(),
"expected 1 db files but had ["
+ Arrays.toString(Files.list(dbDir).toArray())
+ "]");
checkData(fileCollectionMap.get(testType), storedOffsetsMap.get(testType), testType, 0, 1000, 10_000);
// close db
fileCollection2.close();
Expand Down

0 comments on commit e20b66a

Please sign in to comment.