Author: kkolinko
Date: Thu Jan 7 15:28:11 2016
New Revision: 1723575
URL: http://svn.apache.org/viewvc?rev=1723575&view=rev
Log:
Update TomcatBaseTest, as BZ 52028 fix has been committed.
For https://bz.apache.org/bugzilla/show_bug.cgi?id=52028
Modified:
tomcat/tc6.0.x/branches/tomcat6-testing_20160106/test/org/apache/catalina/startup/TomcatBaseTest.java
Modified:
tomcat/tc6.0.x/branches/tomcat6-testing_20160106/test/org/apache/catalina/startup/TomcatBaseTest.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/branches/tomcat6-testing_20160106/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1723575&r1=1723574&r2=1723575&view=diff
==============================================================================
---
tomcat/tc6.0.x/branches/tomcat6-testing_20160106/test/org/apache/catalina/startup/TomcatBaseTest.java
(original)
+++
tomcat/tc6.0.x/branches/tomcat6-testing_20160106/test/org/apache/catalina/startup/TomcatBaseTest.java
Thu Jan 7 15:28:11 2016
@@ -82,9 +82,8 @@ public abstract class TomcatBaseTest ext
* Sub-classes need to know port so they can connect
*/
public int getPort() {
-//FIXME: Implement support for port number "0" and getLocalPort() method.
// return tomcat.getConnector().getLocalPort();
- return tomcat.findConnectors()[0].getPort();
+ return tomcat.findConnectors()[0].getLocalPort();
}
/**
@@ -94,9 +93,6 @@ public abstract class TomcatBaseTest ext
return accessLogEnabled;
}
- //FIXME: implement support for post number 0.
- private static volatile int portIncrement = 0;
-
@Before
@Override
public void setUp() throws Exception {
@@ -127,10 +123,7 @@ public abstract class TomcatBaseTest ext
connector.setAttribute("address",
InetAddress.getByName("localhost").getHostAddress());
// Use random free port
-//FIXME
-// connector.setPort(0);
- connector.setPort(8080 + portIncrement);
- portIncrement++;
+ connector.setPort(0);
// Mainly set to reduce timeouts during async tests
connector.setAttribute("connectionTimeout", "3000");
tomcat.addConnector(connector);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]