Author: kkolinko Date: Thu Jan 10 21:43:25 2013 New Revision: 1431669 URL: http://svn.apache.org/viewvc?rev=1431669&view=rev Log: Merged revision 1431661 from tomcat/trunk: Relax the test. Relative ordering can pick more JARs than those two that belong to the web application.
Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1431661 Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java?rev=1431669&r1=1431668&r2=1431669&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextResources.java Thu Jan 10 21:43:25 2013 @@ -23,6 +23,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.URL; import java.util.Arrays; +import java.util.List; import javax.servlet.ServletContext; import javax.servlet.ServletException; @@ -86,8 +87,16 @@ public class TestStandardContextResource "<p>resourceG.jsp in WEB-INF/classes</p>", 404); // For BZ 54391. Relative ordering is specified in resources2.jar. - assertEquals(Arrays.asList("resources.jar", "resources2.jar"), ctx - .getServletContext().getAttribute(ServletContext.ORDERED_LIBS)); + // It is not absolute-ordering, so there may be other jars in the list + List<String> orderedLibs = (List<String>) ctx.getServletContext() + .getAttribute(ServletContext.ORDERED_LIBS); + if (orderedLibs.size() > 2) { + log.warn("testResources(): orderedLibs: " + orderedLibs); + } + int index = orderedLibs.indexOf("resources.jar"); + int index2 = orderedLibs.indexOf("resources2.jar"); + assertTrue(orderedLibs.toString(), index >= 0 && index2 >= 0 + && index < index2); } @Test --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org