You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/06/07 20:04:27 UTC

[GitHub] [druid] Codegass commented on a diff in pull request #12512: Refactor the testIsTaskCurrent test case to improve the test experience

Codegass commented on code in PR #12512:
URL: https://github.com/apache/druid/pull/12512#discussion_r891662021


##########
extensions-core/kinesis-indexing-service/src/test/java/org/apache/druid/indexing/kinesis/supervisor/KinesisSupervisorTest.java:
##########
@@ -3911,8 +3907,87 @@ public void testIsTaskCurrent()
         ImmutableSet.of()
     );
 
+    return supervisor;
+  }
+
+  @Test
+  public void testIsTaskCurrentTaskFromStorage()
+  {
+    DateTime minMessageTime = DateTimes.nowUtc();
+    DateTime maxMessageTime = DateTimes.nowUtc().plus(10000);
+
+    KinesisSupervisor supervisor = isCurrentSetup(minMessageTime, maxMessageTime);
+
+    KinesisIndexTask taskFromStorage = createKinesisIndexTask(
+        "id1",
+        0,
+        new SeekableStreamStartSequenceNumbers<>("stream", ImmutableMap.of(
+            SHARD_ID1,
+            "3"
+        ), ImmutableSet.of()),
+        new SeekableStreamEndSequenceNumbers<>("stream", ImmutableMap.of(
+            SHARD_ID1,
+            KinesisSequenceNumber.NO_END_SEQUENCE_NUMBER
+        )),
+        minMessageTime,
+        maxMessageTime,
+        dataSchema
+    );

Review Comment:
   Thank you a lot for the suggestions! I am still new to the Druid project, this comment is really helpful for me!
   I will try to update this part today with the `Pair` Class and avoid redundancy.
   



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org