Author: skitching Date: Sun Apr 16 20:30:38 2006 New Revision: 394603 URL: http://svn.apache.org/viewcvs?rev=394603&view=rev Log: * Fix bug where unit tests weren't getting executed at all (wrong test class name) * Put both resources in child classloader rather than using parent, to avoid confusion with parentFirst not being supported by PathableClassLoader.getResources.
Modified: jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/config/FirstPriorityConfigTestCase.java Modified: jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/config/FirstPriorityConfigTestCase.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/config/FirstPriorityConfigTestCase.java?rev=394603&r1=394602&r2=394603&view=diff ============================================================================== --- jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/config/FirstPriorityConfigTestCase.java (original) +++ jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/config/FirstPriorityConfigTestCase.java Sun Apr 16 20:30:38 2006 @@ -34,11 +34,10 @@ * This test sets up a classpath where: * <ul> * <li> first file found has priority=20 - * <li> second file (in parent path) has priority=10 (parentFirst=false) + * <li> second file found has priority=10 * </ul> * The result should be that the first file is used. */ - public class FirstPriorityConfigTestCase extends TestCase { // ------------------------------------------- JUnit Infrastructure Methods @@ -48,7 +47,7 @@ * Return the tests included in this test suite. */ public static Test suite() throws Exception { - Class thisClass = PriorityConfigTestCase.class; + Class thisClass = FirstPriorityConfigTestCase.class; // Determine the URL to this .class file, so that we can then // append the priority dirs to it. For tidiness, load this @@ -73,15 +72,14 @@ containerLoader.useSystemLoader("junit."); containerLoader.addLogicalLib("commons-logging"); - URL pri10URL = new URL(baseUrl, "priority10/"); - containerLoader.addURL(pri10URL); - PathableClassLoader webappLoader = new PathableClassLoader(containerLoader); - webappLoader.setParentFirst(false); webappLoader.addLogicalLib("testclasses"); - + URL pri20URL = new URL(baseUrl, "priority20/"); webappLoader.addURL(pri20URL); + + URL pri10URL = new URL(baseUrl, "priority10/"); + webappLoader.addURL(pri10URL); // load the test class via webapp loader, and use the webapp loader // as the tccl loader too. @@ -113,7 +111,5 @@ LogFactory instance = LogFactory.getFactory(); String id = (String) instance.getAttribute("configId"); assertEquals("Correct config file loaded", "priority20", id ); - - fail("deliberate failure"); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]