logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: JUnit Errors in 1.2.11 build
Date Thu, 02 Jun 2005 06:19:24 GMT

On Jun 2, 2005, at 12:33 AM, Mark Womack wrote:

> I am running the test cases against the 1.2.11 code, and the  
> minimum case fails right off the bat:
> Minimum:
>    [junit] Running org.apache.log4j.MinimumTestCase
>    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed:  
> 0.501 sec
>    [junit] Testsuite: org.apache.log4j.MinimumTestCase
>    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed:  
> 0.501 sec
>    [junit] ------------- Standard Output ---------------
>    [junit] Files [output/filtered] and [witness/simple] differ on  
> line 28
>    [junit] One reads:  [       at  
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)].
>    [junit] Other reads:[       at java.lang.reflect.Method.invoke 
> (Native Method)].
>    [junit] ------------- ---------------- ---------------

There are a couple of issues, your JVM uses 3 sun.reflect calls when  
the reference uses one java.lang.reflect call and Ant has added  
another layer.  If the number of calls in the stack were equal then  
it might be fairly simple to add another regex transform (like  
LineNumberFilter and AbsoluteDateTimeFilter) that would translate  
sun.reflect... into the same calls as in the witness file.  However,  
things probably get complicated by the mismatch in number of calls in  
the stack.  It might be possible to write a regex transform that  
matches one line and emits multiple lines which would suggest  
rewriting the witness file with the lengthier stack trace and then  
write a regex transform that converts the shorter into the longer one.

I would think the Ant call depth would be constant for any particular  
version of Ant and am surprised that we haven't heard a complaint  
from Gump on that one.  The call stack on a reflecting method  
invocation is apparently and not surprising JVM specific.  The JUnit  
stack would also be subject to change but fortunately for this test,  
its depth doesn't appear to have changed.

What JVM and Ant version are you using?

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message