eolivelli commented on a change in pull request #13055:
URL: https://github.com/apache/pulsar/pull/13055#discussion_r761080876
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/client/api/NonPersistentTopicTest.java
##########
@@ -112,12 +113,20 @@ public void
testNonPersistentPartitionsAreNotAutoCreatedWhenThePartitionedTopicD
final String topicPartitionName =
"non-persistent://public/default/issue-9173-partition-0";
// Then error when subscribe to a partition of a non-persistent
topic that does not exist
-
assertThrows(PulsarClientException.TopicDoesNotExistException.class,
Review comment:
why don't you like assertThrows ?
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
##########
@@ -1562,6 +1562,12 @@ public void connectionFailed(PulsarClientException
exception) {
log.info("[{}] Producer creation failed for producer {}
after producerTimeout", topic, producerId);
}
setState(State.Failed);
+ // release resource if the produce is going to be cleaned
+ try {
+ this.close();
+ } catch (PulsarClientException e) {
+ log.warn("[{}] Close a failed produce {} failed", topic,
producerId, e);
Review comment:
why do we need this ?
it is not good to add this as part of this patch, it is unrelated
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]