Skip to content

Commit

Permalink
Fixed get partitioned stats
Browse files Browse the repository at this point in the history
  • Loading branch information
tuteng committed Mar 31, 2020
1 parent a17cfb8 commit 5458e60
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

import javax.validation.constraints.AssertTrue;
import javax.ws.rs.client.InvocationCallback;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Response.Status;
Expand Down Expand Up @@ -971,7 +972,7 @@ public void partitionedTopics(String topicName) throws Exception {

@Test
public void testGetPartitionedInternalInfo() throws Exception {
String partitionedTopic = "my-topic";
String partitionedTopic = "my-topic" + UUID.randomUUID().toString();
assertEquals(admin.topics().getPartitionedTopicList("prop-xyz/ns1"), Lists.newArrayList());
final String partitionedTopicName = "persistent://prop-xyz/ns1/" + partitionedTopic;
admin.topics().createPartitionedTopic(partitionedTopicName, 2);
Expand Down Expand Up @@ -1019,6 +1020,8 @@ public void testGetPartitionedStatsInternal() throws Exception {
String partitionTopic0 = partitionedTopicName + "-partition-0";
String partitionTopic1 = partitionedTopicName + "-partition-1";

Thread.sleep(1000);

PersistentTopicInternalStats internalStats0 = admin.topics().getInternalStats(partitionTopic0);
assertEquals(internalStats0.cursors.keySet(), Sets.newTreeSet(Lists.newArrayList(Codec.encode(subName))));

Expand Down

0 comments on commit 5458e60

Please sign in to comment.