JAVA-20163 Fix failed integration test with date creation comparison (#14080)
Co-authored-by: timis1 <noreplay@yahoo.com>
This commit is contained in:
parent
9fe90d4663
commit
e6b0ef1d86
|
@ -5,7 +5,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.Instant;
|
||||
import java.util.Date;
|
||||
|
||||
import org.h2.Driver;
|
||||
import org.hibernate.Session;
|
||||
|
@ -81,7 +83,11 @@ class HibernateCreationUpdateTimestampIntegrationTest {
|
|||
session.getTransaction().commit();
|
||||
session.close();
|
||||
|
||||
assertEquals(book.getCreatedOn(), book.getLastUpdatedOn());
|
||||
Date createdOn = Date.from(book.getCreatedOn());
|
||||
Date lastUpdatedOn = Date.from(book.getLastUpdatedOn());
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("dd MM yyyy HH:mm:ss");
|
||||
|
||||
assertEquals(formatter.format(createdOn), formatter.format(lastUpdatedOn));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -108,6 +108,11 @@
|
|||
<module>spring-jooq</module>
|
||||
<module>spring-mybatis</module>
|
||||
<module>spring-persistence-simple</module>
|
||||
|
||||
<module>fauna</module>
|
||||
<module>spring-data-rest</module>
|
||||
<module>java-mongodb</module>
|
||||
<module>questdb</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
|
8
pom.xml
8
pom.xml
|
@ -795,8 +795,6 @@
|
|||
<module>spring-swagger-codegen/custom-validations-opeanpi-codegen</module>
|
||||
<module>testing-modules/testing-assertions</module>
|
||||
<module>testing-modules/mockito-simple</module>
|
||||
<module>persistence-modules/fauna</module>
|
||||
<module>persistence-modules/spring-data-rest</module>
|
||||
|
||||
<module>rule-engines-modules</module>
|
||||
|
||||
|
@ -924,11 +922,9 @@
|
|||
<module>vertx-modules</module>
|
||||
<module>xstream</module>
|
||||
<module>webrtc</module>
|
||||
<module>persistence-modules/java-mongodb</module>
|
||||
|
||||
<module>messaging-modules</module>
|
||||
|
||||
<module>persistence-modules/questdb</module>
|
||||
<module>vaadin</module>
|
||||
<module>libraries-3</module>
|
||||
<module>web-modules</module>
|
||||
|
@ -1058,8 +1054,6 @@
|
|||
<module>spring-swagger-codegen/custom-validations-opeanpi-codegen</module>
|
||||
<module>testing-modules/testing-assertions</module>
|
||||
<module>testing-modules/mockito-simple</module>
|
||||
<module>persistence-modules/fauna</module>
|
||||
<module>persistence-modules/spring-data-rest</module>
|
||||
|
||||
<module>rule-engines-modules</module>
|
||||
|
||||
|
@ -1187,11 +1181,9 @@
|
|||
<module>vertx-modules</module>
|
||||
<module>xstream</module>
|
||||
<module>webrtc</module>
|
||||
<module>persistence-modules/java-mongodb</module>
|
||||
|
||||
<module>messaging-modules</module>
|
||||
|
||||
<module>persistence-modules/questdb</module>
|
||||
<module>vaadin</module>
|
||||
<module>libraries-3</module>
|
||||
<module>web-modules</module>
|
||||
|
|
Loading…
Reference in New Issue