315157973 commented on a change in pull request #9262:
URL: https://github.com/apache/pulsar/pull/9262#discussion_r562002683
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApiOffloadTest.java
##########
@@ -180,43 +183,32 @@ public void testOffloadPolicies() throws Exception {
public void testOffloadPoliciesApi() throws Exception {
final String topicName = testTopic + UUID.randomUUID().toString();
admin.topics().createPartitionedTopic(topicName, 3);
- //wait for server init
- Thread.sleep(1000);
+ pulsarClient.newProducer().topic(topicName).create().close();
+ Awaitility.await().atMost(10, TimeUnit.SECONDS)
Review comment:
Okay, let me extend the timeout period, but based on experience, the
initialization will be successful within 2 seconds.
----------------------------------------------------------------
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:
[email protected]