This is an automated email from the ASF dual-hosted git repository. penghui pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 6ba062c11317e07d7dca7863f56e9ac8d116047b Author: penghui <[email protected]> AuthorDate: Wed Jul 7 21:17:27 2021 +0800 Fix cherry-pick issue. --- .../org/apache/pulsar/proxy/server/ProxyServiceStarter.java | 13 +++---------- .../apache/pulsar/proxy/server/ProxyServiceStarterTest.java | 12 ------------ 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyServiceStarter.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyServiceStarter.java index 300091d..25e0f59 100644 --- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyServiceStarter.java +++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyServiceStarter.java @@ -271,17 +271,10 @@ public class ProxyServiceStarter { private static ClusterData createClusterData(ProxyConfiguration config) { if (isNotBlank(config.getBrokerServiceURL()) || isNotBlank(config.getBrokerServiceURLTLS())) { - return ClusterData.builder() - .serviceUrl(config.getBrokerWebServiceURL()) - .serviceUrlTls(config.getBrokerWebServiceURLTLS()) - .brokerServiceUrl(config.getBrokerServiceURL()) - .brokerServiceUrlTls(config.getBrokerServiceURLTLS()) - .build(); + return new ClusterData(config.getBrokerWebServiceURL(), config.getBrokerWebServiceURLTLS(), + config.getBrokerServiceURL(), config.getBrokerServiceURLTLS()); } else if (isNotBlank(config.getBrokerWebServiceURL()) || isNotBlank(config.getBrokerWebServiceURLTLS())) { - return ClusterData.builder() - .serviceUrl(config.getBrokerWebServiceURL()) - .serviceUrlTls(config.getBrokerWebServiceURLTLS()) - .build(); + return new ClusterData(config.getBrokerWebServiceURL(), config.getBrokerWebServiceURLTLS()); } else { return null; } diff --git a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyServiceStarterTest.java b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyServiceStarterTest.java index 3377ec2..228927f 100644 --- a/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyServiceStarterTest.java +++ b/pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyServiceStarterTest.java @@ -72,18 +72,6 @@ public class ProxyServiceStarterTest extends MockedPulsarServiceBaseTest { } @Test - public void testEnableWebSocketServer() throws Exception { - HttpClient httpClient = new HttpClient(); - WebSocketClient webSocketClient = new WebSocketClient(httpClient); - webSocketClient.start(); - MyWebSocket myWebSocket = new MyWebSocket(); - String webSocketUri = "ws://localhost:8080/ws/pingpong"; - Future<Session> sessionFuture = webSocketClient.connect(myWebSocket, URI.create(webSocketUri)); - sessionFuture.get().getRemote().sendPing(ByteBuffer.wrap("ping".getBytes())); - assertTrue(myWebSocket.getResponse().contains("ping")); - } - - @Test public void testProducer() throws Exception { @Cleanup PulsarClient client = PulsarClient.builder().serviceUrl("pulsar://localhost:11000")
