We're updating the issue view to help you get more done. 

Unit test failures due to date/time precision mismatches

Description

FooBarTest#testQuery is failing because a Oracle DATE values include time up to seconds.
This method executes the following:

{{list = s.createQuery( "from Foo foo where ? = some elements(foo.component.importantDates)" )
.setParameter( 0, new Date(), StandardBasicTypes.DATE )
.list();

Unless the value is within a half second of what was persisted, no results will be returned and the test will fail.

The test will pass if foo.getTimestamp() is bound instead. This is because Foo#onSave initializes the timestamp property to the current time, and the same value is ultimately added to {{Foo.component.importantDates.

Environment

None

Status

Assignee

Gail Badner

Reporter

Gail Badner

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.0.4

Priority

Major