jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Changelog Plugin
  • MCHANGELOG-68

testReadFile unit test timebased comparisons fail

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.1
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    2.0.7

Description

The unit tests in ChangeLogTest that test the changeset file for time comparisons such as:

ChangeSet changeSet = (ChangeSet) changelogSets.getChangeSets().get( 0 );


        Calendar cal = Calendar.getInstance(); // new cal with default TZ

        cal.set( 1977, 7, 6, 5, 30, 0); // expected date from min-changelog.xml

        cal.set( Calendar.MILLISECOND, 0);


        assertEquals( "Test changelog 1 set 1 date/time", cal.getTime().getTime(), changeSet.getDate().getTime() );

Fail on my UK GMT machine with trace:

junit.framework.AssertionFailedError: Test changelog 1 set 1 date/time expected:<239671800000> but was:<239686200000>
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.failNotEquals(Assert.java:282)
	at junit.framework.Assert.assertEquals(Assert.java:64)
	at junit.framework.Assert.assertEquals(Assert.java:136)
	at org.apache.maven.plugin.changelog.ChangeLogTest.testReadFile(ChangeLogTest.java:63)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Issue Links

relates to

Bug - A problem which impairs or prevents the functions of the product. MCHANGELOG-36 Tests fail on build

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Dennis Lundberg added a comment - 26/Jul/07 6:31 PM

I can confirm that this is a bug. As a workaround you can set the timezone in your OS to GMT+1. I know, it's not pretty but it's a workaround.

Show
Dennis Lundberg added a comment - 26/Jul/07 6:31 PM I can confirm that this is a bug. As a workaround you can set the timezone in your OS to GMT+1. I know, it's not pretty but it's a workaround.

People

  • Assignee:
    Unassigned
    Reporter:
    John Allen
Vote (0)
Watch (0)

Dates

  • Created:
    26/Jul/07 4:02 PM
    Updated:
    09/Feb/12 5:09 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.