poorbarcode commented on code in PR #22769:
URL: https://github.com/apache/pulsar/pull/22769#discussion_r1612788299


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorTest.java:
##########
@@ -698,10 +708,19 @@ public void testDeleteNonPartitionedTopic() throws 
Exception {
         // Verify replicator works.
         verifyReplicationWorks(topicName);
 
+        admin1.topicPolicies().setCompactionThreshold(topicName, 1000_000);
+        Awaitility.await().atMost(Duration.ofSeconds(3600)).untilAsserted(() 
-> {
+            
assertEquals(admin2.topicPolicies().getCompactionThreshold(topicName), 
1000_000);
+        });
+
         // Disable replication.
         setTopicLevelClusters(topicName, Arrays.asList(cluster1), admin1, 
pulsar1);
         setTopicLevelClusters(topicName, Arrays.asList(cluster2), admin2, 
pulsar2);
 
+        Thread.sleep(3 * 1000);
+        TopicPolicies topicPolicies1 = 
pulsar1.getTopicPoliciesService().getTopicPolicies(TopicName.get(topicName));

Review Comment:
   Removed



##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorTest.java:
##########
@@ -698,10 +708,19 @@ public void testDeleteNonPartitionedTopic() throws 
Exception {
         // Verify replicator works.
         verifyReplicationWorks(topicName);
 
+        admin1.topicPolicies().setCompactionThreshold(topicName, 1000_000);
+        Awaitility.await().atMost(Duration.ofSeconds(3600)).untilAsserted(() 
-> {

Review Comment:
   Sorry, it is for debugging, I removed it.



##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorTest.java:
##########
@@ -698,10 +708,19 @@ public void testDeleteNonPartitionedTopic() throws 
Exception {
         // Verify replicator works.
         verifyReplicationWorks(topicName);
 
+        admin1.topicPolicies().setCompactionThreshold(topicName, 1000_000);
+        Awaitility.await().atMost(Duration.ofSeconds(3600)).untilAsserted(() 
-> {
+            
assertEquals(admin2.topicPolicies().getCompactionThreshold(topicName), 
1000_000);
+        });
+
         // Disable replication.
         setTopicLevelClusters(topicName, Arrays.asList(cluster1), admin1, 
pulsar1);
         setTopicLevelClusters(topicName, Arrays.asList(cluster2), admin2, 
pulsar2);
 
+        Thread.sleep(3 * 1000);

Review Comment:
   Because the operation that calls the expanding API will be executed aync



-- 
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-unsubscr...@pulsar.apache.org

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

Reply via email to