diff --git a/hadoop-hdds/framework/src/test/java/org/apache/hadoop/hdds/utils/db/TestRDBStore.java b/hadoop-hdds/framework/src/test/java/org/apache/hadoop/hdds/utils/db/TestRDBStore.java index f95a8ff0520b..c1eafa6111a4 100644 --- a/hadoop-hdds/framework/src/test/java/org/apache/hadoop/hdds/utils/db/TestRDBStore.java +++ b/hadoop-hdds/framework/src/test/java/org/apache/hadoop/hdds/utils/db/TestRDBStore.java @@ -288,42 +288,6 @@ public void testRocksDBCheckpointCleanup() throws Exception { } } - /** - * Not strictly a unit test. Just a confirmation of the expected behavior - * of RocksDB keyMayExist API. - * Expected behavior - On average, keyMayExist latency < key.get() latency - * for invalid keys. - * @throws Exception if unable to read from RocksDB. - */ - @Test - public void testRocksDBKeyMayExistApi() throws Exception { - try (RDBStore newStore = - new RDBStore(folder.newFolder(), options, configSet)) { - RocksDB db = newStore.getDb(); - - //Test with 50 invalid keys. - long start = System.nanoTime(); - for (int i = 0; i < 50; i++) { - Assert.assertTrue(db.get( - org.apache.commons.codec.binary.StringUtils - .getBytesUtf16("key" + i)) == null); - } - long end = System.nanoTime(); - long keyGetLatency = end - start; - - start = System.nanoTime(); - for (int i = 0; i < 50; i++) { - Assert.assertFalse(db.keyMayExist( - org.apache.commons.codec.binary.StringUtils - .getBytesUtf16("key" + i), null)); - } - end = System.nanoTime(); - long keyMayExistLatency = end - start; - - Assert.assertTrue(keyMayExistLatency < keyGetLatency); - } - } - @Test public void testGetDBUpdatesSince() throws Exception {