cameronlee314 commented on a change in pull request #951: SAMZA-2127: Upgrade 
to Kafka 2.0
URL: https://github.com/apache/samza/pull/951#discussion_r267086592
 
 

 ##########
 File path: 
samza-kafka/src/test/java/org/apache/samza/system/kafka/TestKafkaSystemAdminJava.java
 ##########
 @@ -275,11 +280,62 @@ public void testClearStream() {
       TopicDescription td = dtr.all().get().get(topicName);
       Assert.fail("topic " + topicName + " should've been removed. td=" + td);
     } catch (Exception e) {
-      if (e.getCause() instanceof 
org.apache.kafka.common.errors.UnknownTopicOrPartitionException) {
-        // expected
-      } else {
+      if (!(e.getCause() instanceof 
org.apache.kafka.common.errors.UnknownTopicOrPartitionException)) {
         Assert.fail("topic " + topicName + " should've been removed. Expected 
UnknownTopicOrPartitionException.");
       }
     }
   }
+
+  @Test
+  public void testShouldAssembleMetadata () {
+    Map<SystemStreamPartition, String> oldestOffsets = new 
ImmutableMap.Builder<SystemStreamPartition, String>()
+        .put(new SystemStreamPartition(SYSTEM, "stream1", new Partition(0)), 
"o1")
+        .put(new SystemStreamPartition(SYSTEM, "stream2", new Partition(0)), 
"o2")
+        .put(new SystemStreamPartition(SYSTEM, "stream1", new Partition(1)), 
"o3")
+        .put(new SystemStreamPartition(SYSTEM, "stream2", new Partition(1)), 
"o4")
+        .build();
+
 
 Review comment:
   Minor: extra whitespace

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to