You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Steve Loughran <st...@iseran.com> on 2003/12/23 18:56:08 UTC

unit test failures

I am just building up a clean box and running all the tests, or not as 
it happens as there an encoding failure:

The result is not what is expected. expected:<12:01:30.150Z> but 
was:<13:01:30.150Z>

junit.framework.AssertionFailedError: The result is not what is 
expected. expected:<12:01:30.150Z> but was:<13:01:30.150Z>
at test.encoding.TestDeser.deserialize(TestDeser.java:177)
at test.encoding.TestDeser.deserialize(TestDeser.java:147)
at test.encoding.TestDeser2001.testTimeTZ(TestDeser2001.java:125)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


for reference I am in the UK which in winter time is UTC, running 
java1.4.2 on rh9.0

I will have a look at it tomorrow if nobody else gets in there first (!)
-steve


Re: tz encoding

Posted by Steve Loughran <st...@iseran.com>.
Steve Loughran wrote:

> I dont think I can fix this in the next 15 minutes of code-time left 
> this year, but will write some more tests with more explicit TZ and 
> month options.

Glen,

I see you have commented out the tests that I added because they break 
the system.

Even before those tests were added, the unit tests do not work on my box 
in GMT0BST time zone, so commenting them out does not fix the build on 
my system. All you are doing is hiding the problem from the main build, 
when it is still out there.

If we have tests that fail, I dont think commenting them out is the best 
way of avoiding running them. The alternate solution is to exclude them 
from the main build and then use a special ant target to run 
tests-that-fail. But commenting them out is not test-first development, 
and makes it too easy to forget that the defect exists.

(This is a situation that XP doesnt cover: what if you have defects you 
can test for but not fix)

-steve




tz encoding

Posted by Steve Loughran <st...@iseran.com>.
Steve Loughran wrote:
> 
> I am just building up a clean box and running all the tests, or not as 
> it happens as there an encoding failure:
> 
> The result is not what is expected. expected:<12:01:30.150Z> but 
> was:<13:01:30.150Z>
> 
> junit.framework.AssertionFailedError: The result is not what is 
> expected. expected:<12:01:30.150Z> but was:<13:01:30.150Z>
> at test.encoding.TestDeser.deserialize(TestDeser.java:177)
> at test.encoding.TestDeser.deserialize(TestDeser.java:147)
> at test.encoding.TestDeser2001.testTimeTZ(TestDeser2001.java:125)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

oh, this is good.

Looks like we cannot deser properly in the UK in winter time (no offset 
from GMT) but can in summer (+1 hour).

I dont think I can fix this in the next 15 minutes of code-time left 
this year, but will write some more tests with more explicit TZ and 
month options.

-steve