lhotari commented on code in PR #4706:
URL: https://github.com/apache/bookkeeper/pull/4706#discussion_r2973270188
##########
bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/storage/ldb/EntryLocationIndexTest.java:
##########
@@ -231,4 +236,39 @@ public void testEntryIndexLookupLatencyStats() throws
IOException {
assertEquals(1, lookupEntryLocationOpStats.getFailureCount());
assertEquals(1, lookupEntryLocationOpStats.getSuccessCount());
}
+
+ @Test
+ @Timeout(60)
+ public void testClose() throws Exception {
+ File tmpDir = File.createTempFile("bkTest", ".dir");
+ tmpDir.delete();
+ tmpDir.mkdir();
+ tmpDir.deleteOnExit();
+
+ EntryLocationIndex idx = new EntryLocationIndex(serverConfiguration,
KeyValueStorageRocksDB.factory,
+ tmpDir.getAbsolutePath(), NullStatsLogger.INSTANCE);
+
+ // mock EntryLocationIndex is compacting
+ idx.compacting.set(true);
+ AtomicBoolean closeFlag = new AtomicBoolean(false);
+ AtomicLong closeEscapedMills = new AtomicLong(0);
Review Comment:
nit: escaped -> elapsed
--
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]