hemantk-12 commented on code in PR #4584:
URL: https://github.com/apache/ozone/pull/4584#discussion_r1183133786
##########
hadoop-hdds/rocks-native/src/test/java/org/apache/hadoop/hdds/utils/db/managed/TestManagedSSTDumpIterator.java:
##########
@@ -0,0 +1,109 @@
+package org.apache.hadoop.hdds.utils.db.managed;
+
+import org.apache.commons.lang3.tuple.Pair;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.nio.charset.StandardCharsets;
+import java.util.Map;
+import java.util.Optional;
+import java.util.TreeMap;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.IntStream;
+
+/**
+ * Test for ManagedSSTDumpIterator.
+ */
+public class TestManagedSSTDumpIterator {
+
+ private void testSSTDumpIteratorWithKeys(
+ Map<Pair<String, Integer>, String> records)
+ throws Exception {
+ Map<Pair<String, Integer>, String> keys = records instanceof TreeMap ?
Review Comment:
1. These tests could be changed in to parameterized test.
2. If you expect `records` to be an instance of `TreeMap`, wouldn't it be
better for requested to send a `TreeMap` itself.
3. I don't get (or like) idea of using `Pair<String, Integer>` as key. It
could be simplified if you use parameterized tests.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]