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
child.

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
pass.

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
failure.

Any thoughts on this one?  Have I missed something?

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

Regards,

Brian



                
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to