Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-6745

org.jboss.test.cmp2.audit.test.AuditUnitTestCase failing with MySQL - miliseconds not supported

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • JBossAS-5.1.0.GA
    • JBossAS-5.1.0.Beta1
    • Test Suite
    • None

      Tests in org.jboss.test.cmp2.audit.test.AuditUnitTestCase are failing because MySQL does not support storage of miliseconds when storing DATETIME (or any other).

      (This is part of the effort of trying to run the jboss-all-config-tests target of the AS testsuite against different databases.)

      testUpdateAudit Failure Expected created time to be set between 1238076991121-1238076991136 during the test but got 1238076991000
      junit.framework.AssertionFailedError: Expected created time to be set between 1238076991121-1238076991136 during the test but got 1238076991000
      at org.jboss.test.cmp2.audit.test.AuditUnitTestCase.testUpdateAudit(AuditUnitTestCase.java:77)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.extensions.TestSetup.run(TestSetup.java:25)

      The problem is that the created time is saved in the DB, then retrieved and compared to the values taken before and after the audit was created.

      This is similar to JBPAPP-1063 where Emmanuel noted: "Actually I would expect the test to fail. We ened to tell our customer that MySQL will not be able to support millisecond timestamp."

            smcgowan@redhat.com Shelly McGowan (Inactive)
            exd-mmalina Martin Malina
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: