[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-3652) CompositeIdWithGeneratorTest needs a standard way to compare timestamps

Juraci Paixao Krohling (JIRA) noreply at atlassian.com
Fri Dec 12 11:01:38 EST 2008


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juraci Paixao Krohling updated HHH-3652:
----------------------------------------

    Fix Version/s: 3.4
                   3.3.x

Adding fix-version.

> CompositeIdWithGeneratorTest needs a standard way to compare timestamps
> -----------------------------------------------------------------------
>
>                 Key: HHH-3652
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3652
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: testsuite
>         Environment: Branch_3_3 and trunk / MSSQL 2005
>            Reporter: Juraci Paixao Krohling
>            Assignee: Juraci Paixao Krohling
>             Fix For: 3.3.x, 3.4
>
>         Attachments: CompositeIdWithGeneratorTest.java.diff
>
>
> Entities retrieved from database have milliseconds in its timestamp, while the timestamp of the same record doesn't. So, when comparing both in assertEquals, it gives a failure, even though the timestamps are the same. 
> Formatting both timestamps using SimpleDateFormat makes it pass. The attached patch fixes it, using the longest format possible without milliseconds. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list