You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sk...@apache.org on 2006/01/20 00:53:59 UTC
svn commit: r370673 - in
/jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/pathable:
ChildFirstTestCase.java ParentFirstTestCase.java
Author: skitching
Date: Thu Jan 19 15:53:55 2006
New Revision: 370673
URL: http://svn.apache.org/viewcvs?rev=370673&view=rev
Log:
Fixes due to renaming of Log4J12Logger back to Log4JLogger
Modified:
jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/pathable/ChildFirstTestCase.java
jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/pathable/ParentFirstTestCase.java
Modified: jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/pathable/ChildFirstTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/pathable/ChildFirstTestCase.java?rev=370673&r1=370672&r2=370673&view=diff
==============================================================================
--- jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/pathable/ChildFirstTestCase.java (original)
+++ jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/pathable/ChildFirstTestCase.java Thu Jan 19 15:53:55 2006
@@ -145,8 +145,8 @@
// jcl adapter classes should be visible via both parent and child. However
// as the classloaders are child-first we should see the child one.
- Class log4jClass = contextLoader.loadClass("org.apache.commons.logging.impl.Log4J12Logger");
- assertSame("Log4J12Logger not loaded via child",
+ Class log4jClass = contextLoader.loadClass("org.apache.commons.logging.impl.Log4JLogger");
+ assertSame("Log4JLogger not loaded via child",
log4jClass.getClassLoader(), thisLoader);
// test classes should be visible via the child only
@@ -193,9 +193,9 @@
// to the child should be returned. The URL returned will be of form
// jar:file:/x/y.jar!path/to/resource. The filename part should include the jarname
// of form commons-logging-adapters-nnnn.jar, not commons-logging-nnnn.jar
- resource = childLoader.getResource("org/apache/commons/logging/impl/Log4J12Logger.class");
- assertNotNull("Unable to locate Log4J12Logger.class resource", resource);
- assertTrue("Incorrect source for Log4J12Logger class",
+ resource = childLoader.getResource("org/apache/commons/logging/impl/Log4JLogger.class");
+ assertNotNull("Unable to locate Log4JLogger.class resource", resource);
+ assertTrue("Incorrect source for Log4JLogger class",
resource.toString().indexOf("/commons-logging-adapters-1.") > 0);
}
@@ -237,9 +237,9 @@
// is still (parent-resources, child-resources). This test verifies the expected
// behaviour - even though it's not the desired behaviour.
- resources = childLoader.getResources("org/apache/commons/logging/impl/Log4J12Logger.class");
+ resources = childLoader.getResources("org/apache/commons/logging/impl/Log4JLogger.class");
urls = toURLArray(resources);
- assertEquals("Unexpected number of Log4J12Logger.class resources found", 2, urls.length);
+ assertEquals("Unexpected number of Log4JLogger.class resources found", 2, urls.length);
// There is no gaurantee about the ordering of results returned from getResources
// To make this test portable across JVMs, sort the string to give them a known order
@@ -247,9 +247,9 @@
urlsToStrings[0] = urls[0].toString();
urlsToStrings[1] = urls[1].toString();
Arrays.sort(urlsToStrings);
- assertTrue("Incorrect source for Log4J12Logger class",
+ assertTrue("Incorrect source for Log4JLogger class",
urlsToStrings[0].indexOf("/commons-logging-1.") > 0);
- assertTrue("Incorrect source for Log4J12Logger class",
+ assertTrue("Incorrect source for Log4JLogger class",
urlsToStrings[1].indexOf("/commons-logging-adapters-1.") > 0);
}
Modified: jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/pathable/ParentFirstTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/pathable/ParentFirstTestCase.java?rev=370673&r1=370672&r2=370673&view=diff
==============================================================================
--- jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/pathable/ParentFirstTestCase.java (original)
+++ jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/pathable/ParentFirstTestCase.java Thu Jan 19 15:53:55 2006
@@ -142,8 +142,8 @@
// jcl adapter classes should be visible via both parent and child. However
// as the classloaders are parent-first we should see the parent one.
- Class log4jClass = contextLoader.loadClass("org.apache.commons.logging.impl.Log4J12Logger");
- assertSame("Log4J12Logger not loaded via parent",
+ Class log4jClass = contextLoader.loadClass("org.apache.commons.logging.impl.Log4JLogger");
+ assertSame("Log4JLogger not loaded via parent",
log4jClass.getClassLoader(), parentLoader);
// test classes should be visible via the child only
@@ -190,9 +190,9 @@
// to the parent should be returned. The URL returned will be of form
// jar:file:/x/y.jar!path/to/resource. The filename part should include the jarname
// of form commons-logging-nnnn.jar, not commons-logging-adapters-nnnn.jar
- resource = childLoader.getResource("org/apache/commons/logging/impl/Log4J12Logger.class");
- assertNotNull("Unable to locate Log4J12Logger.class resource", resource);
- assertTrue("Incorrect source for Log4J12Logger class",
+ resource = childLoader.getResource("org/apache/commons/logging/impl/Log4JLogger.class");
+ assertNotNull("Unable to locate Log4JLogger.class resource", resource);
+ assertTrue("Incorrect source for Log4JLogger class",
resource.toString().indexOf("/commons-logging-1.") > 0);
}
@@ -227,9 +227,9 @@
// getResources where the resource exists in both.
// resources should be returned in order (parent-resource, child-resource)
- resources = childLoader.getResources("org/apache/commons/logging/impl/Log4J12Logger.class");
+ resources = childLoader.getResources("org/apache/commons/logging/impl/Log4JLogger.class");
urls = toURLArray(resources);
- assertEquals("Unexpected number of Log4J12Logger.class resources found", 2, urls.length);
+ assertEquals("Unexpected number of Log4JLogger.class resources found", 2, urls.length);
// There is no gaurantee about the ordering of results returned from getResources
// To make this test portable across JVMs, sort the string to give them a known order
@@ -237,9 +237,9 @@
urlsToStrings[0] = urls[0].toString();
urlsToStrings[1] = urls[1].toString();
Arrays.sort(urlsToStrings);
- assertTrue("Incorrect source for Log4J12Logger class",
+ assertTrue("Incorrect source for Log4JLogger class",
urlsToStrings[0].indexOf("/commons-logging-1.") > 0);
- assertTrue("Incorrect source for Log4J12Logger class",
+ assertTrue("Incorrect source for Log4JLogger class",
urlsToStrings[1].indexOf("/commons-logging-adapters-1.") > 0);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org