-
Bug
-
Resolution: Won't Do
-
Major
-
4.3.0.GA_CP02
-
None
-
HP-UX ia64 JDK 1.6
org.jboss.test.cmp2.audit.test.AuditUnitTestCase is failing in several tests with messages such as this:
junit.framework.AssertionFailedError: Expected created time to be set between 1222987376893-1222987376898 during the test but got 1222987376880
at org.jboss.test.cmp2.audit.test.AuditUnitTestCase.testUpdateAuditMappedChangedFields(AuditUnitTestCase.java:172)
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)
As you can see, the created time is usually only a few milliseconds off the range which causes the failure. IMO it's just that the testing machine is too slow, but we need to clarify that.
In the tests, current time is taken, then a method of a deployed jar is called to get the current time and then again the current time is taken in the test case again. Finally it checks if the middle time is in between of the start and end times.