You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/06/30 11:11:10 UTC

[GitHub] [kafka] thomaskwscott commented on a change in pull request #10936: KAFKA-13002 Fix for non max timestamp degrade case

thomaskwscott commented on a change in pull request #10936:
URL: https://github.com/apache/kafka/pull/10936#discussion_r661359984



##########
File path: clients/src/test/java/org/apache/kafka/clients/admin/KafkaAdminClientTest.java
##########
@@ -4346,6 +4346,51 @@ public void testListOffsetsUnsupportedNonMaxTimestamp() {
         }
     }
 
+    @Test
+    public void testListOffsetsNonMaxTimestampDowngradedImmediately() throws Exception {
+        Node node = new Node(0, "localhost", 8120);
+        List<Node> nodes = Collections.singletonList(node);
+        List<PartitionInfo> pInfos = new ArrayList<>();
+        pInfos.add(new PartitionInfo("foo", 0, node, new Node[]{node}, new Node[]{node}));
+        final Cluster cluster = new Cluster(
+                "mockClusterId",
+                nodes,
+                pInfos,
+                Collections.emptySet(),
+                Collections.emptySet(),
+                node);
+        final TopicPartition tp0 = new TopicPartition("foo", 0);
+
+        try (AdminClientUnitTestEnv env = new AdminClientUnitTestEnv(cluster,
+                AdminClientConfig.RETRIES_CONFIG, "2")) {
+
+            ApiVersion oldBrokerVersion = new ApiVersion();
+            oldBrokerVersion.setApiKey(ApiKeys.LIST_OFFSETS.id);
+            oldBrokerVersion.setMinVersion((short) 0);
+            oldBrokerVersion.setMaxVersion((short) 6);
+            env.kafkaClient().setNodeApiVersions(NodeApiVersions.create(

Review comment:
       fixed




-- 
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: jira-unsubscribe@kafka.apache.org

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