Fix test that fails due to timezone offsets causing the result set to vary between 1 and 2

This commit is contained in:
Vlad Mihalcea 2016-02-05 12:33:35 +02:00
parent 8ff853e133
commit 85cec6ba33
1 changed files with 2 additions and 2 deletions

View File

@ -1891,10 +1891,10 @@ public class HQLTest extends BaseEntityManagerFunctionalTestCase {
List<Person> persons = entityManager.createQuery(
"select p " +
"from Person p " +
"where p.createdOn between '2000-01-01' and '2000-01-02'", Person.class )
"where p.createdOn between '1999-01-01' and '2001-01-02'", Person.class )
.getResultList();
//end::hql-between-predicate-example[]
assertEquals(1, persons.size());
assertEquals(2, persons.size());
});
}