zymap commented on code in PR #23612:
URL: https://github.com/apache/pulsar/pull/23612#discussion_r1849992592
##########
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:
@codelipenghui Using Mockito causes other errors so I moved the test to
another file.
@lhotari The motication is we met some core dumps when running pulsar
service. Then saw Netty suggested using io.netty.noUnsafe to see if it works.
https://github.com/netty/netty/issues/2950. After adding that property, the
core dump is gone, but the metrics failed to report because of the
UnsupportedOpeartion exception. Then I made this support to use the direct
buffer to avoid that exception.
--
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]