File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/revfordate Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -121,4 +121,20 @@ public void testRevisionsForDates() {
121121
122122assert vr .getRevisionDate ( vr .getRevisionNumberForDate ( new Date ( timestamp4 ) ) ).getTime () <= timestamp4 ;
123123}
124+
125+ @ Test
126+ @ SkipForDialect (value = CockroachDialect .class , comment = "Fails because of int size" )
127+ public void testRevisionsForInstant () {
128+ AuditReader vr = getAuditReader ();
129+
130+ assert vr .getRevisionDate ( vr .getRevisionNumberForDate ( new Date ( timestamp2 ).toInstant () ) ).getTime () <= timestamp2 ;
131+ assert vr .getRevisionDate ( vr .getRevisionNumberForDate ( new Date ( timestamp2 ).toInstant () ).intValue () + 1 )
132+ .getTime () > timestamp2 ;
133+
134+ assert vr .getRevisionDate ( vr .getRevisionNumberForDate ( new Date ( timestamp3 ).toInstant () ) ).getTime () <= timestamp3 ;
135+ assert vr .getRevisionDate ( vr .getRevisionNumberForDate ( new Date ( timestamp3 ).toInstant () ).intValue () + 1 )
136+ .getTime () > timestamp3 ;
137+
138+ assert vr .getRevisionDate ( vr .getRevisionNumberForDate ( new Date ( timestamp4 ).toInstant () ) ).getTime () <= timestamp4 ;
139+ }
124140}
You can’t perform that action at this time.
0 commit comments