Fixes after merge.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
9c13cf3a52
commit
ec273b7cf0
|
@ -79,9 +79,10 @@ public abstract class AbstractHttpClientServerTest
|
|||
HttpClientTransport transport = new HttpClientTransportOverHTTP(clientConnector);
|
||||
QueuedThreadPool executor = new QueuedThreadPool();
|
||||
executor.setName("client");
|
||||
clientConnector.setExecutor(executor);
|
||||
Scheduler scheduler = new ScheduledExecutorScheduler("client-scheduler", false);
|
||||
clientConnector.setScheduler(scheduler);
|
||||
client = newHttpClient(transport);
|
||||
client.setScheduler(scheduler);
|
||||
client.setSocketAddressResolver(new SocketAddressResolver.Sync());
|
||||
if (config != null)
|
||||
config.accept(client);
|
||||
|
|
|
@ -52,6 +52,7 @@ public class TLSServerConnectionCloseTest
|
|||
clientConnector.setSelectors(1);
|
||||
|
||||
SslContextFactory.Client sslContextFactory = new SslContextFactory.Client();
|
||||
sslContextFactory.setEndpointIdentificationAlgorithm(null);
|
||||
sslContextFactory.setKeyStorePath("src/test/resources/keystore.jks");
|
||||
sslContextFactory.setKeyStorePassword("storepwd");
|
||||
clientConnector.setSslContextFactory(sslContextFactory);
|
||||
|
|
|
@ -71,6 +71,7 @@ public class TryFilesFilterTest
|
|||
|
||||
ClientConnector clientConnector = new ClientConnector();
|
||||
SslContextFactory.Client clientSslContextFactory = new SslContextFactory.Client();
|
||||
clientSslContextFactory.setEndpointIdentificationAlgorithm(null);
|
||||
clientSslContextFactory.setKeyStorePath("src/test/resources/keystore.jks");
|
||||
clientSslContextFactory.setKeyStorePassword("storepwd");
|
||||
clientSslContextFactory.setTrustStorePath("src/test/resources/truststore.jks");
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<Configure class="org.eclipse.jetty.client.HttpClient">
|
||||
<Arg>
|
||||
<New class="org.eclipse.jetty.util.ssl.SslContextFactory"/>
|
||||
</Arg>
|
||||
<Call name="getAuthenticationStore">
|
||||
<Call name="addAuthentication">
|
||||
<Arg>
|
||||
|
@ -18,4 +15,4 @@
|
|||
</Arg>
|
||||
</Call>
|
||||
</Call>
|
||||
</Configure>
|
||||
</Configure>
|
||||
|
|
|
@ -47,6 +47,7 @@ import org.eclipse.jetty.http.HttpHeader;
|
|||
import org.eclipse.jetty.http.HttpMethod;
|
||||
import org.eclipse.jetty.io.ArrayByteBufferPool;
|
||||
import org.eclipse.jetty.io.ByteBufferPool;
|
||||
import org.eclipse.jetty.io.ClientConnector;
|
||||
import org.eclipse.jetty.io.LeakTrackingByteBufferPool;
|
||||
import org.eclipse.jetty.io.MappedByteBufferPool;
|
||||
import org.eclipse.jetty.server.Connector;
|
||||
|
@ -369,9 +370,8 @@ public class HttpClientLoadTest extends AbstractTest<HttpClientLoadTest.LoadTran
|
|||
{
|
||||
if (transport == Transport.UNIX_SOCKET)
|
||||
{
|
||||
UnixSocketConnector
|
||||
unixSocketConnector = new UnixSocketConnector( server, provideServerConnectionFactory( transport ));
|
||||
unixSocketConnector.setUnixSocket( sockFile.toString() );
|
||||
UnixSocketConnector unixSocketConnector = new UnixSocketConnector(server, provideServerConnectionFactory(transport));
|
||||
unixSocketConnector.setUnixSocket(sockFile.toString());
|
||||
return unixSocketConnector;
|
||||
}
|
||||
int cores = ProcessorUtils.availableProcessors();
|
||||
|
@ -389,7 +389,10 @@ public class HttpClientLoadTest extends AbstractTest<HttpClientLoadTest.LoadTran
|
|||
case HTTP:
|
||||
case HTTPS:
|
||||
{
|
||||
HttpClientTransport clientTransport = new HttpClientTransportOverHTTP(1);
|
||||
ClientConnector clientConnector = new ClientConnector();
|
||||
clientConnector.setSelectors(1);
|
||||
clientConnector.setSslContextFactory(sslContextFactory);
|
||||
HttpClientTransport clientTransport = new HttpClientTransportOverHTTP(clientConnector);
|
||||
clientTransport.setConnectionPoolFactory(destination -> new LeakTrackingConnectionPool(destination, client.getMaxConnectionsPerDestination(), destination)
|
||||
{
|
||||
@Override
|
||||
|
@ -417,7 +420,7 @@ public class HttpClientLoadTest extends AbstractTest<HttpClientLoadTest.LoadTran
|
|||
}
|
||||
case UNIX_SOCKET:
|
||||
{
|
||||
HttpClientTransportOverUnixSockets clientTransport = new HttpClientTransportOverUnixSockets( sockFile.toString() );
|
||||
HttpClientTransportOverUnixSockets clientTransport = new HttpClientTransportOverUnixSockets(sockFile.toString());
|
||||
clientTransport.setConnectionPoolFactory(destination -> new LeakTrackingConnectionPool(destination, client.getMaxConnectionsPerDestination(), destination)
|
||||
{
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue