use of com.yahoo.pulsar.websocket.service.ProxyServer in project pulsar by yahoo.
the class ProxyAuthenticationTest method setup.
@BeforeClass
public void setup() throws Exception {
super.internalSetup();
super.producerBaseSetup();
WebSocketProxyConfiguration config = new WebSocketProxyConfiguration();
config.setWebServicePort(TEST_PORT);
config.setClusterName("use");
config.setAuthenticationEnabled(true);
config.setAuthenticationProviders(Sets.newHashSet("com.yahoo.pulsar.websocket.proxy.MockAuthenticationProvider"));
service = spy(new WebSocketService(config));
doReturn(mockZooKeeperClientFactory).when(service).getZooKeeperClientFactory();
proxyServer = new ProxyServer(config);
WebSocketServiceStarter.start(proxyServer, service);
log.info("Proxy Server Started");
}
use of com.yahoo.pulsar.websocket.service.ProxyServer in project pulsar by yahoo.
the class ProxyPublishConsumeTest method setup.
@BeforeClass
public void setup() throws Exception {
super.internalSetup();
super.producerBaseSetup();
WebSocketProxyConfiguration config = new WebSocketProxyConfiguration();
config.setWebServicePort(TEST_PORT);
config.setClusterName("use");
config.setGlobalZookeeperServers("dummy-zk-servers");
service = spy(new WebSocketService(config));
doReturn(mockZooKeeperClientFactory).when(service).getZooKeeperClientFactory();
proxyServer = new ProxyServer(config);
WebSocketServiceStarter.start(proxyServer, service);
log.info("Proxy Server Started");
}
use of com.yahoo.pulsar.websocket.service.ProxyServer in project pulsar by yahoo.
the class ProxyPublishConsumeTls method setup.
@BeforeClass
public void setup() throws Exception {
super.internalSetup();
super.producerBaseSetup();
WebSocketProxyConfiguration config = new WebSocketProxyConfiguration();
config.setWebServicePort(TEST_PORT);
config.setWebServicePortTls(TLS_TEST_PORT);
config.setTlsEnabled(true);
config.setTlsKeyFilePath(TLS_SERVER_KEY_FILE_PATH);
config.setTlsCertificateFilePath(TLS_SERVER_CERT_FILE_PATH);
config.setClusterName("use");
config.setGlobalZookeeperServers("dummy-zk-servers");
service = spy(new WebSocketService(config));
doReturn(mockZooKeeperClientFactory).when(service).getZooKeeperClientFactory();
proxyServer = new ProxyServer(config);
WebSocketServiceStarter.start(proxyServer, service);
log.info("Proxy Server Started");
}
use of com.yahoo.pulsar.websocket.service.ProxyServer in project pulsar by yahoo.
the class ProxyPublishConsumeWithoutZKTest method setup.
@BeforeClass
public void setup() throws Exception {
super.internalSetup();
super.producerBaseSetup();
WebSocketProxyConfiguration config = new WebSocketProxyConfiguration();
config.setWebServicePort(TEST_PORT);
config.setClusterName("use");
config.setServiceUrl(pulsar.getWebServiceAddress());
config.setServiceUrlTls(pulsar.getWebServiceAddressTls());
service = spy(new WebSocketService(config));
doReturn(mockZooKeeperClientFactory).when(service).getZooKeeperClientFactory();
proxyServer = new ProxyServer(config);
WebSocketServiceStarter.start(proxyServer, service);
log.info("Proxy Server Started");
}
Aggregations