Upgraded Hibernate to 5.2.2.Final version.
This commit is contained in:
parent
b60a8c3d7e
commit
2d61ab0615
|
@ -189,13 +189,13 @@
|
|||
|
||||
<properties>
|
||||
<!-- Spring -->
|
||||
<org.springframework.version>4.2.5.RELEASE</org.springframework.version>
|
||||
<org.springframework.version>4.3.2.RELEASE</org.springframework.version>
|
||||
<javassist.version>3.20.0-GA</javassist.version>
|
||||
|
||||
<!-- persistence -->
|
||||
<hibernate.version>4.3.11.Final</hibernate.version>
|
||||
<hibernate.version>5.2.2.Final</hibernate.version>
|
||||
<mysql-connector-java.version>5.1.38</mysql-connector-java.version>
|
||||
<spring-data-jpa.version>1.8.2.RELEASE</spring-data-jpa.version>
|
||||
<spring-data-jpa.version>1.10.2.RELEASE</spring-data-jpa.version>
|
||||
<h2.version>1.4.192</h2.version>
|
||||
|
||||
<!-- logging -->
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.baeldung.persistence.service;
|
|||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.baeldung.config.ProductConfig;
|
||||
import org.baeldung.config.UserConfig;
|
||||
|
@ -57,10 +58,13 @@ public class JpaMultipleDBIntegrationTest {
|
|||
user2.setAge(10);
|
||||
try {
|
||||
user2 = userRepository.save(user2);
|
||||
userRepository.flush();
|
||||
fail("DataIntegrityViolationException should be thrown!");
|
||||
} catch (final DataIntegrityViolationException e) {
|
||||
// Expected
|
||||
} catch (final Exception e) {
|
||||
fail("DataIntegrityViolationException should be thrown, instead got: " + e);
|
||||
}
|
||||
|
||||
assertNull(userRepository.findOne(user2.getId()));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue