DATAJDBC-209 - Polishing.

Added a comment to explain why we have to use a Timestamp for the comparison.

Original pull request: #66.
This commit is contained in:
Jens Schauder
2018-05-15 10:33:19 +02:00
parent 52a8daf003
commit f1e36a73e1

View File

@@ -196,6 +196,9 @@ public class QueryAnnotationHsqlIntegrationTests {
@Test // DATAJDBC-175
public void executeCustomQueryWithReturnTypeIsDate() {
// Since Timestamp extends Date the repository returns the Timestamp as it comes from the database.
// Trying to compare that to an actual Date results in non determistic results, so we have to use an actual
// Timestamp.
Date now = new Timestamp(System.currentTimeMillis());
assertThat(repository.nowWithDate()).isAfterOrEqualsTo(now);