jianyun8023 commented on code in PR #22329:
URL: https://github.com/apache/pulsar/pull/22329#discussion_r1536637875


##########
pulsar-common/src/test/java/org/apache/pulsar/common/util/netty/DnsResolverTest.java:
##########
@@ -18,13 +18,42 @@
  */
 package org.apache.pulsar.common.util.netty;
 
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.testng.Assert.assertEquals;
 import io.netty.channel.EventLoop;
 import io.netty.resolver.dns.DnsNameResolverBuilder;
+import java.security.Security;
+import org.mockito.ArgumentCaptor;
 import org.mockito.Mockito;
 import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 public class DnsResolverTest {
+    private static final int MIN_TTL = 0;
+    private static final int TTL = 101;
+    private static final int NEGATIVE_TTL = 121;
+
+    @BeforeClass
+    public void beforeClass() {
+        Security.setProperty("networkaddress.cache.ttl",Integer.toString(TTL));
+        
Security.setProperty("networkaddress.cache.negative.ttl",Integer.toString(NEGATIVE_TTL));

Review Comment:
   At present, I'm unable to restore my previous configuration. Reverting it to 
default values should resolve the issue. There is no method to clear the value 
of the Security property.



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