commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Stansberry <>
Subject [logging] LoadTest
Date Mon, 30 May 2005 04:17:20 GMT
I've been testing my new implementation of
LogFactoryImpl and it's looking good except it fails
the "testInContainer" test of o.a.c.l.LoadTest.  This
test sets up a parent-last (aka child-first)
classloader hierarchy that has JCL and a class that
calls JCL in the child.  JCL is also visible in the
parent.  It then performs various tests, setting the
thread context class loader to various values and
trying to log.

This test is designed to fail if logging succeeds when
the TCCL is set to the system classloader or the
parent classloader.  

The old implementation of LogFactoryImpl does throw a
LogConfigurationException in this situation, as
discovery finds an adapter in the parent that is
binary incompatible with the LogFactoryImpl in the

The new implementation does not throw an LCE, as it
detects the incompatibility and retries loading the
adapter using the LogFactoryImpl's classloader.  But,
because logging succeeds, this unit test does not

It is my interpretation that this unit test is really
checking for *consistent* behavior of the old
implementation, not for *correct* behavior.  It would
catch things like a change to the old implementation
that caused it to forget to try the TCCL.  But IMHO an
implementation that was specifically designed to
handle this situation shouldn't cause a unit test

Any thoughts on this one?  Have I missed something?

BTW, LoadTest is not invoked by the ant test target.



Do you Yahoo!? 
Yahoo! Small Business - Try our new Resources site

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message