Skip to content

Commit

Permalink
Removing catch exception from IT
Browse files Browse the repository at this point in the history
Signed-off-by: Dharmesh 💤 <sdharms@amazon.com>
  • Loading branch information
psychbot committed Jun 30, 2023
1 parent 45b8233 commit 5c446f3
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,16 +292,14 @@ public void testStaleCommitDeletionWithInvokeFlush() throws Exception {
Path indexPath = Path.of(String.valueOf(absolutePath), indexUUID, "/0/segments/metadata");
// Delete is async.
assertBusy(() -> {
try {
int actualFileCount = getFileCount(indexPath);
if (numberOfIterations <= RemoteStoreRefreshListener.LAST_N_METADATA_FILES_TO_KEEP) {
assertEquals(numberOfIterations, actualFileCount);
} else {
// As delete is async its possible that the file gets created before the deletion or after
// deletion.
assertTrue(actualFileCount >= 10 || actualFileCount <= 11);
}
} catch (Exception e) {}
int actualFileCount = getFileCount(indexPath);
if (numberOfIterations <= RemoteStoreRefreshListener.LAST_N_METADATA_FILES_TO_KEEP) {
assertEquals(numberOfIterations, actualFileCount);
} else {
// As delete is async its possible that the file gets created before the deletion or after
// deletion.
assertTrue(actualFileCount >= 10 || actualFileCount <= 11);
}
}, 30, TimeUnit.SECONDS);
}

Expand Down

0 comments on commit 5c446f3

Please sign in to comment.