提交 a54a1bf7 编写于 作者: J jai1 提交者: Matteo Merli

Corrected test case ProxyAuthentication, ProxyPublishConsumeTls and...

Corrected test case ProxyAuthentication, ProxyPublishConsumeTls and ProxyPublishConsumeWithoutZK (#245)
上级 99cf1dc4
......@@ -44,7 +44,7 @@ import com.yahoo.pulsar.websocket.service.WebSocketServiceStarter;
public class ProxyAuthenticationTest extends ProducerConsumerBase {
protected String methodName;
private static final int TEST_PORT = 6080;
private static final int TEST_PORT = PortManager.nextFreePort();
private static final String CONSUME_URI = "ws://localhost:" + TEST_PORT
+ "/ws/consumer/persistent/my-property/use/my-ns/my-topic/my-sub";
private static final String PRODUCE_URI = "ws://localhost:" + TEST_PORT
......
......@@ -29,6 +29,7 @@ import javax.net.ssl.KeyManager;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import org.apache.bookkeeper.test.PortManager;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.websocket.api.Session;
import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;
......@@ -50,12 +51,13 @@ import io.netty.handler.ssl.util.InsecureTrustManagerFactory;
public class ProxyPublishConsumeTls extends ProducerConsumerBase {
protected String methodName;
private static final String CONSUME_URI = "wss://localhost:6090/ws/consumer/persistent/my-property/use/my-ns/my-topic/my-sub";
private static final String PRODUCE_URI = "wss://localhost:6090/ws/producer/persistent/my-property/use/my-ns/my-topic/";
private static final int TEST_PORT = PortManager.nextFreePort();
private static final int TLS_TEST_PORT = PortManager.nextFreePort();
private static final String CONSUME_URI = "wss://localhost:" + TLS_TEST_PORT + "/ws/consumer/persistent/my-property/use/my-ns/my-topic/my-sub";
private static final String PRODUCE_URI = "wss://localhost:" + TLS_TEST_PORT + "/ws/producer/persistent/my-property/use/my-ns/my-topic/";
private static final String TLS_SERVER_CERT_FILE_PATH = "./src/test/resources/certificate/server.crt";
private static final String TLS_SERVER_KEY_FILE_PATH = "./src/test/resources/certificate/server.key";
private static final int TEST_PORT = 6080;
private static final int TLS_TEST_PORT = 6090;
private static final String TLS_SERVER_KEY_FILE_PATH = "./src/test/resources/certificate/server.key";
private ProxyServer proxyServer;
private WebSocketService service;
......
......@@ -21,6 +21,7 @@ import static org.mockito.Mockito.spy;
import java.net.URI;
import java.util.concurrent.Future;
import org.apache.bookkeeper.test.PortManager;
import org.eclipse.jetty.websocket.api.Session;
import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;
import org.eclipse.jetty.websocket.client.WebSocketClient;
......@@ -39,9 +40,9 @@ import com.yahoo.pulsar.websocket.service.WebSocketServiceStarter;
public class ProxyPublishConsumeWithoutZKTest extends ProducerConsumerBase {
protected String methodName;
private static final String CONSUME_URI = "ws://localhost:6080/ws/consumer/persistent/my-property/use/my-ns/my-topic/my-sub";
private static final String PRODUCE_URI = "ws://localhost:6080/ws/producer/persistent/my-property/use/my-ns/my-topic/";
private static final int TEST_PORT = 6080;
private static final int TEST_PORT = PortManager.nextFreePort();
private static final String CONSUME_URI = "ws://localhost:" + TEST_PORT + "/ws/consumer/persistent/my-property/use/my-ns/my-topic/my-sub";
private static final String PRODUCE_URI = "ws://localhost:" + TEST_PORT + "/ws/producer/persistent/my-property/use/my-ns/my-topic/";
private ProxyServer proxyServer;
private WebSocketService service;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册