HHH-10465 - Loss of precision in temporal JavaTypeDescriptor implementations
Fix test to work on UTC-X timezones as well
This commit is contained in:
parent
3e5025ac10
commit
7b263f8697
|
@ -8,6 +8,7 @@ package org.hibernate.test.type;
|
||||||
|
|
||||||
import java.sql.Time;
|
import java.sql.Time;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
@ -43,8 +44,8 @@ public class TimeAndTimestampTest extends BaseNonConfigCoreFunctionalTestCase {
|
||||||
} );
|
} );
|
||||||
doInHibernate( this::sessionFactory, session -> {
|
doInHibernate( this::sessionFactory, session -> {
|
||||||
Event event = session.find( Event.class, 1L );
|
Event event = session.find( Event.class, 1L );
|
||||||
assertEquals(123, event.timeValue.getTime());
|
assertEquals(123, event.timeValue.getTime() % TimeUnit.DAYS.toMillis( 1 ));
|
||||||
assertEquals(456, event.timestampValue.getTime());
|
assertEquals(456, event.timestampValue.getTime() % TimeUnit.DAYS.toMillis( 1 ));
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue