Maven SCM
  1. Maven SCM
  2. SCM-120

ClearCase Changelog test failure

    Details

    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      junit.framework.ComparisonFailure: expected:<...10...> but was:<...09...>

      at junit.framework.Assert.assertEquals(Assert.java:81)
      at junit.framework.Assert.assertEquals(Assert.java:87)
      at org.apache.maven.scm.provider.clearcase.command.changelog.ClearCaseChangeLogCommandTest.testCommandLine(ClearCaseChangeLogCommandTest.java:97)
      at org.apache.maven.scm.provider.clearcase.command.changelog.ClearCaseChangeLogCommandTest.testGetCommandLineWithStartDate(ClearCaseChangeLogCommandTest.java:69)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        Activity

        Hide
        Mike Perham added a comment -

        I believe this issue is due to timezones. 10-Sep-03 GMT is 09-Sep-03 in my timezone (US Central time). Can you update the test to be a little more forgiving of this?

        Show
        Mike Perham added a comment - I believe this issue is due to timezones. 10-Sep-03 GMT is 09-Sep-03 in my timezone (US Central time). Can you update the test to be a little more forgiving of this?
        Hide
        Mike Perham added a comment -

        This fixes the problem:

        Index: src/test/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommandTest.java
        ===================================================================
        — src/test/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommandTest.java (revision 365748)
        +++ src/test/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommandTest.java (working copy)
        @@ -62,7 +62,7 @@
        {
        String tag = null;

        • Date startDate = getDate( 2003, 8, 10, GMT_TIME_ZONE );
          + Date startDate = getDate( 2003, 8, 10 );

        Date endDate = null;

        @@ -75,7 +75,7 @@
        {
        String tag = "myBranch";

        • Date startDate = getDate( 2003, 8, 10, GMT_TIME_ZONE );
          + Date startDate = getDate( 2003, 8, 10 );

        Date endDate = null;

        Show
        Mike Perham added a comment - This fixes the problem: Index: src/test/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommandTest.java =================================================================== — src/test/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommandTest.java (revision 365748) +++ src/test/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommandTest.java (working copy) @@ -62,7 +62,7 @@ { String tag = null; Date startDate = getDate( 2003, 8, 10, GMT_TIME_ZONE ); + Date startDate = getDate( 2003, 8, 10 ); Date endDate = null; @@ -75,7 +75,7 @@ { String tag = "myBranch"; Date startDate = getDate( 2003, 8, 10, GMT_TIME_ZONE ); + Date startDate = getDate( 2003, 8, 10 ); Date endDate = null;
        Hide
        Emmanuel Venisse added a comment -

        mike,
        you can apply your patch and close this issue

        Show
        Emmanuel Venisse added a comment - mike, you can apply your patch and close this issue
        Hide
        Mike Perham added a comment -

        Patch applied.

        Show
        Mike Perham added a comment - Patch applied.

          People

          • Assignee:
            Mike Perham
            Reporter:
            Mike Perham
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: