lhotari commented on code in PR #23612:
URL: https://github.com/apache/pulsar/pull/23612#discussion_r1848078100
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/prometheus/PrometheusMetricsGeneratorTest.java:
##########
@@ -32,13 +32,22 @@
import java.util.Random;
import java.util.concurrent.ExecutionException;
import java.util.zip.GZIPInputStream;
+import lombok.Cleanup;
import org.apache.commons.io.IOUtils;
import org.apache.pulsar.broker.PulsarService;
import org.apache.pulsar.broker.ServiceConfiguration;
+import org.apache.pulsar.common.util.SimpleTextOutputStream;
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
public class PrometheusMetricsGeneratorTest {
+
+ @BeforeClass
+ public static void setProperties() {
+ System.setProperty("io.netty.noUnsafe", "true");
Review Comment:
This could impact other tests running in the same JVM. A test that changes
this property should be run independently. This will have no effect if Netty is
already initialized when the test runs. I'd recommend creating a separate test
class with the method if there's a need to test this in CI.
I don't yet understand the motivation for supporting unsafe mode, so I also
think that testing this is unecessary in the first place.
--
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]