Author: markt Date: Sun Jul 10 14:40:00 2011 New Revision: 1144868 URL: http://svn.apache.org/viewvc?rev=1144868&view=rev Log: Make it easier for tests to override the protocol (e.g. to test AJP)
Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1144868&r1=1144867&r2=1144868&view=diff ============================================================================== --- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original) +++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Sun Jul 10 14:40:00 2011 @@ -125,14 +125,7 @@ public abstract class TomcatBaseTest ext tomcat = new Tomcat(); - // Has a protocol been specified - String protocol = System.getProperty("tomcat.test.protocol"); - - // Use BIO by default - if (protocol == null) { - protocol = "org.apache.coyote.http11.Http11Protocol"; - } - + String protocol = getProtocol(); Connector connector = new Connector(protocol); // If each test is running on same port - they // may interfere with each other @@ -164,6 +157,18 @@ public abstract class TomcatBaseTest ext } } + protected String getProtocol() { + // Has a protocol been specified + String protocol = System.getProperty("tomcat.test.protocol"); + + // Use BIO by default + if (protocol == null) { + protocol = "org.apache.coyote.http11.Http11Protocol"; + } + + return protocol; + } + @Override public void tearDown() throws Exception { // Some tests may call tomcat.destroy(), some tests may just call --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org