Issue #4518 - Add a mechanism that allows running multiple protocols on the same port.

Made test methods public, so that they will work fine in JDK 11 and JPMS.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2020-02-17 00:53:44 +01:00
parent 9f7a82b128
commit ed7f337856
3 changed files with 15 additions and 15 deletions

View File

@ -326,7 +326,7 @@ public class DetectorConnectionTest
}
@Test
void testDetectorToNextDetector() throws Exception
public void testDetectorToNextDetector() throws Exception
{
String keystore = MavenTestingUtils.getTestResourceFile("keystore").getAbsolutePath();
SslContextFactory sslContextFactory = new SslContextFactory.Server();
@ -357,7 +357,7 @@ public class DetectorConnectionTest
}
@Test
void testDetectorWithDetectionUnsuccessful() throws Exception
public void testDetectorWithDetectionUnsuccessful() throws Exception
{
AtomicBoolean detectionSuccessful = new AtomicBoolean(true);
ProxyConnectionFactory proxy = new ProxyConnectionFactory(HttpVersion.HTTP_1_1.asString());
@ -392,7 +392,7 @@ public class DetectorConnectionTest
}
@Test
void testDetectorWithProxyThatHasNoNextProto() throws Exception
public void testDetectorWithProxyThatHasNoNextProto() throws Exception
{
String keystore = MavenTestingUtils.getTestResourceFile("keystore").getAbsolutePath();
SslContextFactory sslContextFactory = new SslContextFactory.Server();
@ -419,7 +419,7 @@ public class DetectorConnectionTest
}
@Test
void testOptionalSsl() throws Exception
public void testOptionalSsl() throws Exception
{
String keystore = MavenTestingUtils.getTestResourceFile("keystore").getAbsolutePath();
SslContextFactory sslContextFactory = new SslContextFactory.Server();
@ -447,7 +447,7 @@ public class DetectorConnectionTest
}
@Test
void testDetectorThatHasNoConfiguredNextProto() throws Exception
public void testDetectorThatHasNoConfiguredNextProto() throws Exception
{
String keystore = MavenTestingUtils.getTestResourceFile("keystore").getAbsolutePath();
SslContextFactory sslContextFactory = new SslContextFactory.Server();
@ -471,7 +471,7 @@ public class DetectorConnectionTest
}
@Test
void testDetectorWithNextProtocolThatDoesNotExist() throws Exception
public void testDetectorWithNextProtocolThatDoesNotExist() throws Exception
{
HttpConnectionFactory http = new HttpConnectionFactory();
ProxyConnectionFactory proxy = new ProxyConnectionFactory("does-not-exist");
@ -506,7 +506,7 @@ public class DetectorConnectionTest
}
@Test
void testDetectingWithNextProtocolThatDoesNotImplementUpgradeTo() throws Exception
public void testDetectingWithNextProtocolThatDoesNotImplementUpgradeTo() throws Exception
{
ConnectionFactory.Detecting noUpgradeTo = new ConnectionFactory.Detecting()
{
@ -573,7 +573,7 @@ public class DetectorConnectionTest
}
@Test
void testDetectorWithNextProtocolThatDoesNotImplementUpgradeTo() throws Exception
public void testDetectorWithNextProtocolThatDoesNotImplementUpgradeTo() throws Exception
{
ConnectionFactory noUpgradeTo = new ConnectionFactory()
{
@ -619,7 +619,7 @@ public class DetectorConnectionTest
}
@Test
void testGeneratedProtocolNames()
public void testGeneratedProtocolNames()
{
String keystore = MavenTestingUtils.getTestResourceFile("keystore").getAbsolutePath();
SslContextFactory sslContextFactory = new SslContextFactory.Server();
@ -635,13 +635,13 @@ public class DetectorConnectionTest
}
@Test
void testDetectorWithNoDetectingFails()
public void testDetectorWithNoDetectingFails()
{
assertThrows(IllegalArgumentException.class, DetectorConnectionFactory::new);
}
@Test
void testExerciseDetectorNotEnoughBytes() throws Exception
public void testExerciseDetectorNotEnoughBytes() throws Exception
{
ConnectionFactory.Detecting detectingNeverRecognizes = new ConnectionFactory.Detecting()
{

View File

@ -206,7 +206,7 @@ public class OptionalSslConnectionTest
}
@Test
void testNextProtocolIsNotNullButNotConfiguredEither() throws Exception
public void testNextProtocolIsNotNullButNotConfiguredEither() throws Exception
{
QueuedThreadPool serverThreads = new QueuedThreadPool();
serverThreads.setName("server");

View File

@ -189,7 +189,7 @@ public class ProxyConnectionTest
@ParameterizedTest
@MethodSource("requestProcessors")
void testSimple(RequestProcessor p) throws Exception
public void testSimple(RequestProcessor p) throws Exception
{
String request = "PROXY TCP 1.2.3.4 5.6.7.8 111 222\r\n" +
"GET /path HTTP/1.1\n" +
@ -207,7 +207,7 @@ public class ProxyConnectionTest
@ParameterizedTest
@MethodSource("requestProcessors")
void testSimpleV2(RequestProcessor p) throws Exception
public void testSimpleV2(RequestProcessor p) throws Exception
{
String proxy =
// Preamble
@ -243,7 +243,7 @@ public class ProxyConnectionTest
@ParameterizedTest
@MethodSource("requestProcessors")
void testMaxHeaderLengthV2(RequestProcessor p) throws Exception
public void testMaxHeaderLengthV2(RequestProcessor p) throws Exception
{
p.customize((connector) ->
{