Use a dummy exception class when calling log(exception). This makes the unit test output less confusing.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/logging/trunk@563165 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -27,6 +27,7 @@ import java.util.List;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.apache.commons.logging.DummyException;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
@@ -204,7 +205,7 @@ public abstract class StandardTests extends TestCase {
|
||||
* Log messages with exceptions
|
||||
*/
|
||||
private void logExceptionMessages(Log log) {
|
||||
Throwable t = new IndexOutOfBoundsException();
|
||||
Throwable t = new DummyException();
|
||||
log.trace("trace", t); // Should not actually get logged
|
||||
log.debug("debug", t); // Should not actually get logged
|
||||
log.info("info", t);
|
||||
|
||||
Reference in New Issue
Block a user