Add a millisecond sleep to ensure generated timestamp annotation tests work
This commit is contained in:
parent
58078aee66
commit
b326b303d3
|
@ -47,6 +47,13 @@ public class InVmGenerationsWithAnnotationsTests {
|
|||
assertThat( saved.lastUpdatedOn ).isNotNull();
|
||||
|
||||
saved.name = "changed";
|
||||
// Let's sleep a millisecond to make sure we actually generate a different timestamp
|
||||
try {
|
||||
Thread.sleep( 1L );
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
// Ignore
|
||||
}
|
||||
|
||||
// then changing
|
||||
final AuditedEntity merged = scope.fromTransaction( session, (s) -> {
|
||||
|
|
|
@ -48,6 +48,13 @@ public class InVmGenerationsWithAnnotationsWithMixedSqlTypesTests {
|
|||
assertThat( saved.lastUpdatedOn ).isNotNull();
|
||||
|
||||
saved.name = "changed";
|
||||
// Let's sleep a millisecond to make sure we actually generate a different timestamp
|
||||
try {
|
||||
Thread.sleep( 1L );
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
// Ignore
|
||||
}
|
||||
|
||||
// then changing
|
||||
final AuditedEntity merged = scope.fromTransaction( session, (s) -> {
|
||||
|
|
|
@ -49,6 +49,13 @@ public class InVmGenerationsWithMultipleAnnotationsTests {
|
|||
assertThat( saved.lastUpdatedOn ).isNotNull();
|
||||
|
||||
saved.name = "changed";
|
||||
// Let's sleep a millisecond to make sure we actually generate a different timestamp
|
||||
try {
|
||||
Thread.sleep( 1L );
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
// Ignore
|
||||
}
|
||||
|
||||
// then changing
|
||||
final AuditedEntity merged = scope.fromTransaction( session, (s) -> {
|
||||
|
|
Loading…
Reference in New Issue