JooHyukKim commented on code in PR #20555:
URL: https://github.com/apache/pulsar/pull/20555#discussion_r1240576317


##########
pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java:
##########
@@ -139,22 +139,24 @@ protected void setup() throws Exception {
 
     @AfterMethod(alwaysRun = true)
     public void rest() throws Exception {
-        pulsar.getConfiguration().setForceDeleteTenantAllowed(true);
-        pulsar.getConfiguration().setForceDeleteNamespaceAllowed(true);
+        if (pulsar != null) {

Review Comment:
   ### Explanation
   
   Current version is second approach, `null`-checking where the original issue 
#20553 arises. This will just work because if Pulsar is `null`, it means that 
all resources are closed and 
   
   [First approach 
(đź”—commit)](https://github.com/apache/pulsar/pull/20555/commits/ea15855511c1fd371a8d46eb8288ff26e62d17db)
 was removing `null` assignment nullifying Pulsar instance in base 
`MockedPulsarServiceBaseTest`, but later on this first approach turns out to be 
unncessary because Pulsar instance appropriately invokes `pulsar.close()` 
before `null`-assignment.



-- 
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]

Reply via email to