1
0
Commit Graph

255 Commits

Author SHA1 Message Date
Simon Kitching
e0d9632d8b Rename testcase files, as batch junit testing only detects classes ending in "TestCase".
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@424082 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 21:59:50 +00:00
Simon Kitching
23d8dd0c2c Only count security exceptions before a message is actually logged, as j.u.logging
does (and should) generate security exceptions.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@424078 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 21:52:52 +00:00
Simon Kitching
7d08044587 Add more unit tests for SecurityManager/AccessController issues
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@423653 13f79535-47bb-0310-9956-ffa450edef68
2006-07-19 23:26:49 +00:00
Simon Kitching
fc6da5291a Add unit tests to check behaviour when running in applet-like environments
with restrictive security managers.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@420478 13f79535-47bb-0310-9956-ffa450edef68
2006-07-10 10:25:49 +00:00
Simon Kitching
ea5bc9e2a3 Remove weird unicode char in comments that causes compile warnings
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@420429 13f79535-47bb-0310-9956-ffa450edef68
2006-07-10 06:03:14 +00:00
Simon Kitching
ad4970dbde Fix a few trivial compiler warnings.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@406303 13f79535-47bb-0310-9956-ffa450edef68
2006-05-14 10:02:26 +00:00
Simon Kitching
29935da25a Fix incorrect package name in unit test. The test was still being compiled and
run ok; the generated .class was just ending up in an odd directory.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@406292 13f79535-47bb-0310-9956-ffa450edef68
2006-05-14 09:31:48 +00:00
Robert Burrell Donkin
cd2e8b9657 Replaced method introduced in JDK1.4 with clean implementation.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@396112 13f79535-47bb-0310-9956-ffa450edef68
2006-04-22 11:38:25 +00:00
Simon Kitching
cfb31332a1 * 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.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394603 13f79535-47bb-0310-9956-ffa450edef68
2006-04-17 03:30:38 +00:00
Simon Kitching
93cd3bf810 Add comment about getResources not respecting parentFirst
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394564 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 21:30:57 +00:00
Simon Kitching
f32ae813fc Remove recently-added implementation of getResources. As javadoc already stated,
this can't be implemented because in java 1.4 getResources is final :-(. Unit
tests that care about getResources() order will just have to use parentFirst=true.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394563 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 21:30:19 +00:00
Simon Kitching
0ad40253d6 Handle case of null parent classloader
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394463 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 12:01:57 +00:00
Simon Kitching
3555fbc436 Add unit test to verify that priority of first-found config file is respected
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394460 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 11:35:22 +00:00
Simon Kitching
4cebeec80f Update javadoc only
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394459 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 11:34:33 +00:00
Simon Kitching
77abea9d19 Fix error where getResources() would return parent items first, even when
parentFirst attribute was set to false.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@394457 13f79535-47bb-0310-9956-ffa450edef68
2006-04-16 11:27:11 +00:00
Simon Kitching
f336788e71 Add Serializable tests for NoOpLog.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@381239 13f79535-47bb-0310-9956-ffa450edef68
2006-02-27 03:07:41 +00:00
Simon Kitching
0806aa3672 Move NoOp tests into separate directory.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@381238 13f79535-47bb-0310-9956-ffa450edef68
2006-02-27 02:59:47 +00:00
Simon Kitching
f3a21723bc Execute tests from base AbstractLogTest class in addition to existing tests.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@381237 13f79535-47bb-0310-9956-ffa450edef68
2006-02-27 02:59:11 +00:00
Simon Kitching
037499be30 Add comments, clean up imports.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@381236 13f79535-47bb-0310-9956-ffa450edef68
2006-02-27 02:58:24 +00:00
Simon Kitching
d88846ee06 Add unit tests for the LogKitLogger.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@381234 13f79535-47bb-0310-9956-ffa450edef68
2006-02-27 02:39:54 +00:00
Robert Burrell Donkin
f674577eb8 Added catch and retry using class classloader block. This should hopefully address the cases where the TCCL is not set reasonably.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@375696 13f79535-47bb-0310-9956-ffa450edef68
2006-02-07 20:48:02 +00:00
Dennis Lundberg
bc48278ce3 Remove whitespace before package declaration.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@370915 13f79535-47bb-0310-9956-ffa450edef68
2006-01-20 22:36:31 +00:00
Simon Kitching
9cf2bf6e85 Fix comment only - HashMap *is* in java1.2
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@370753 13f79535-47bb-0310-9956-ffa450edef68
2006-01-20 07:46:30 +00:00
Simon Kitching
ced5aa9dc7 Add unit tests for ServletContextCleaner class.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@370739 13f79535-47bb-0310-9956-ffa450edef68
2006-01-20 05:54:27 +00:00
Simon Kitching
468b013d05 Fixes due to renaming of Log4J12Logger back to Log4JLogger
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@370673 13f79535-47bb-0310-9956-ffa450edef68
2006-01-19 23:53:55 +00:00
Simon Kitching
19a76b429b Add tests for new feature to disable loading of Log implementations via the TCCL.
Move existing tests for disabling loading of LogFactory via TCCL to subdir "logfactory".


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@370031 13f79535-47bb-0310-9956-ffa450edef68
2006-01-18 03:42:52 +00:00
Simon Kitching
aecdf1ebec Clean up imports
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@370013 13f79535-47bb-0310-9956-ffa450edef68
2006-01-18 02:35:03 +00:00
Simon Kitching
1a88e2bd50 Clean up imports only.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@370012 13f79535-47bb-0310-9956-ffa450edef68
2006-01-18 02:34:05 +00:00
Simon Kitching
d08dc18e1c Clean up imports only.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@370011 13f79535-47bb-0310-9956-ffa450edef68
2006-01-18 02:33:03 +00:00
Simon Kitching
69cc4ff86d Fix bug in test; custom MyFactory class wasn't specified in commons-logging.properties!
Also, use constants instead of repeating custom class name as literal.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@369755 13f79535-47bb-0310-9956-ffa450edef68
2006-01-17 11:29:42 +00:00
Simon Kitching
7ff4b00fef Tests for new feature to disable loading of LogFactory implementation via the TCCL.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@369747 13f79535-47bb-0310-9956-ffa450edef68
2006-01-17 10:40:00 +00:00
Simon Kitching
c9a298dd65 Remove debug print statement accidentally left in code.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@369735 13f79535-47bb-0310-9956-ffa450edef68
2006-01-17 09:54:42 +00:00
Simon Kitching
1693599580 Removed unused imports
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@369719 13f79535-47bb-0310-9956-ffa450edef68
2006-01-17 08:41:27 +00:00
Simon Kitching
9a1ec952ae Unit tests for the new LogFactory feature which loads the commons-logging.properties
file with the highest priority.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@369713 13f79535-47bb-0310-9956-ffa450edef68
2006-01-17 08:01:08 +00:00
Simon Kitching
5f4f76c19c Provide facility to add URLs to the classpath.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@369711 13f79535-47bb-0310-9956-ffa450edef68
2006-01-17 07:53:44 +00:00
Simon Kitching
dac6d6bee6 Remove unused imports
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@369709 13f79535-47bb-0310-9956-ffa450edef68
2006-01-17 07:52:41 +00:00
Simon Kitching
0137795092 Tidy imports only
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@360479 13f79535-47bb-0310-9956-ffa450edef68
2006-01-01 07:42:12 +00:00
Robert Burrell Donkin
2f2b9d43eb Added WeakHashtable to standard distribution.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@356024 13f79535-47bb-0310-9956-ffa450edef68
2005-12-11 21:21:10 +00:00
Simon Kitching
8b1398cfa1 Concrete subclass of the generic log4j tests, bound to log4j12.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@220002 13f79535-47bb-0310-9956-ffa450edef68
2005-07-21 06:09:51 +00:00
Simon Kitching
b1d6285f15 Implement a cleaner mechanism for setting up a test suite for classes whose
dependent libs are not present in the system classpath. The class containing
the suite() method *does not have to be* the class that contains the test
methods. By taking advantage of this, we can avoid the reflection stuff and
the trivial helper class that was introduced earlier to solve this same 
problem.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@220001 13f79535-47bb-0310-9956-ffa450edef68
2005-07-21 06:07:30 +00:00
Simon Kitching
697b414639 Fix up log4j12 tests so no log4j lib needs to be in the classpath
when the suite() method is called on any TestCase class.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@209737 13f79535-47bb-0310-9956-ffa450edef68
2005-07-08 11:45:25 +00:00
Simon Kitching
a9958f04f8 Remove obsolete unit test files; see StandardTests class and its concrete subclasses.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@209731 13f79535-47bb-0310-9956-ffa450edef68
2005-07-08 10:09:39 +00:00
Simon Kitching
41c4b10250 Major restructure of log4j unit tests. All the same tests are done as before,
but in a (hopefully) clearer and more maintainable way.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@209730 13f79535-47bb-0310-9956-ffa450edef68
2005-07-08 10:08:25 +00:00
Simon Kitching
8831d63879 Minor tweak to javadocs
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@209729 13f79535-47bb-0310-9956-ffa450edef68
2005-07-08 10:07:13 +00:00
Simon Kitching
9d0c1a7422 Rename LogTest to LogTestCase for consistency.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@209713 13f79535-47bb-0310-9956-ffa450edef68
2005-07-08 07:08:54 +00:00
Simon Kitching
4bd1bd70a0 * renamed test cases from Test.java to TestCase.java for consistency.
* removed unneeded suite and constructor methods.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@209711 13f79535-47bb-0310-9956-ffa450edef68
2005-07-08 07:02:20 +00:00
Robert Burrell Donkin
d163dc0a8f Tweaked test to improve portability across JVMs. (Added sorting of resource to ensure known order.)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@209642 13f79535-47bb-0310-9956-ffa450edef68
2005-07-07 20:16:25 +00:00
Robert Burrell Donkin
dfc008fc82 Tweaked test to improve portability across JVMs. (Added sorting of resource to ensure known order.)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@209633 13f79535-47bb-0310-9956-ffa450edef68
2005-07-07 18:59:21 +00:00
Simon Kitching
3083b9a334 Removed method PathableClassLoader.getResources as in java1.4 and earlier this
method is final (can't be overridden). This means changing the associated unit
test too. As getResources doesn't explicitly indicate the order in which
resources will be returned this is technically ok, though a little ugly.


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@209571 13f79535-47bb-0310-9956-ffa450edef68
2005-07-07 07:32:16 +00:00
Simon Kitching
4c8d747d37 Use custom classloader setups to work around SimpleLog static insanity.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@209452 13f79535-47bb-0310-9956-ffa450edef68
2005-07-06 12:37:25 +00:00