axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pétur Runólfsson <pe...@betware.com>
Subject Error in ConverterUtilTest?
Date Tue, 09 Jun 2009 09:20:55 GMT
Hi,

When I run the test suite for adb in Eclipse, I get a failure in this block (in ConverterUtilTest.testConvertToDate):

        TimeZone timeZone = TimeZone.getTimeZone("Australia/Perth");
        Calendar c = Calendar.getInstance(timeZone);
        c.clear();
        c.set(2008, Calendar.JANUARY, 1);
        TestCase.assertTrue(ConverterUtil.convertToString(c).endsWith("+08:00"));

The result I get from convertToString is 2008-01-01T00:00:00.000+09:00. According to this
page:

http://www.timeanddate.com/worldclock/timezone.html?n=196

DST was in effect in Perth on January 1, 2008, so the correct offset is indeed +09:00.

Related to this, the pom.xml contains the following line:

<exclude>**/*Util*.java</exclude>

This seems to prevent this test from ever being run during the build. ConverterUtilTest.java
seems to be the only file matching this pattern. Is this intentional?

The attached patch removes the exclusion and fixes the time zone offset. It also moves the
offending block into it's own test method, as it is not testing convertToDate.

Pétur Runólfsson
Betware

The content of this e-mail, together with any of its attachments, is for the exclusive and
confidential use of the named addressee(s) and it may contain legally privileged and confidential
information and/or copyrighted material. Any other distribution, use or reproduction without
the sender's prior consent is unauthorized and strictly prohibited. If you have by coincidence,
mistake or without specific authorization received this e-mail in error, please notify the
sender by e-mail immediately, uphold strict confidentiality and neither read, copy, transfer,
disseminate, disclose nor otherwise make use of its content in any way and delete the material
from your computer.

The content of the e-mail and its attachments is the liability of the individual sender, if
it does not relate to the affairs of Betware.
Betware does not assume any civil or criminal liability should the e-mail or it´s attachments
be virus infected.

Mime
View raw message