Added factory method to create HTTP2Client.

This commit is contained in:
Simone Bordet 2015-12-17 21:38:50 +01:00
parent 133e9e054d
commit aa46a51b33
1 changed files with 8 additions and 2 deletions

View File

@ -173,8 +173,7 @@ public abstract class AbstractTest
case H2C: case H2C:
case H2: case H2:
{ {
HTTP2Client http2Client = new HTTP2Client(); HTTP2Client http2Client = newHTTP2Client();
http2Client.setSelectors(1);
return new HttpClientTransportOverHTTP2(http2Client); return new HttpClientTransportOverHTTP2(http2Client);
} }
case FCGI: case FCGI:
@ -188,6 +187,13 @@ public abstract class AbstractTest
} }
} }
protected HTTP2Client newHTTP2Client()
{
HTTP2Client http2Client = new HTTP2Client();
http2Client.setSelectors(1);
return http2Client;
}
protected String newURI() protected String newURI()
{ {
switch (transport) switch (transport)