Author: markt
Date: Wed Mar 28 20:49:57 2012
New Revision: 1306591

URL: http://svn.apache.org/viewvc?rev=1306591&view=rev
Log:
Tweak the test so it can easily be run multiple times in a row without failing.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/mbeans/TestRegistration.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1306580

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/mbeans/TestRegistration.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/mbeans/TestRegistration.java?rev=1306591&r1=1306590&r2=1306591&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/mbeans/TestRegistration.java 
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/mbeans/TestRegistration.java 
Wed Mar 28 20:49:57 2012
@@ -171,10 +171,11 @@ public class TestRegistration extends To
         } else {
             protocol = "bio";
         }
+        String index = 
getTomcatInstance().getConnector().getProperty("nameIndex").toString();
         ArrayList<String> expected = new 
ArrayList<String>(Arrays.asList(basicMBeanNames()));
         expected.addAll(Arrays.asList(hostMBeanNames("localhost")));
         expected.addAll(Arrays.asList(contextMBeanNames("localhost", 
contextName)));
-        expected.addAll(Arrays.asList(connectorMBeanNames("auto-1", 
protocol)));
+        expected.addAll(Arrays.asList(connectorMBeanNames("auto-" + index, 
protocol)));
         expected.addAll(Arrays.asList(optionalMBeanNames("localhost")));
 
         // Did we find all expected MBeans?



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to