Merge branch '5.3.x'
# Conflicts: # spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java # spring-orm/src/main/java/org/springframework/orm/jpa/JpaVendorAdapter.java
This commit is contained in:
@@ -118,7 +118,7 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt
|
||||
|
||||
doInstantiateAndSave(em);
|
||||
setComplete();
|
||||
endTransaction(); // Should rollback
|
||||
endTransaction(); // Should roll back
|
||||
assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1);
|
||||
|
||||
// Now clean up the database
|
||||
@@ -138,7 +138,7 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt
|
||||
EntityManager em = entityManagerFactory.createEntityManager();
|
||||
em.joinTransaction();
|
||||
doInstantiateAndSave(em);
|
||||
endTransaction(); // Should rollback
|
||||
endTransaction(); // Should roll back
|
||||
assertThat(countRowsInTable(em, "person")).as("Tx must have been rolled back").isEqualTo(0);
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt
|
||||
doInstantiateAndSave(em);
|
||||
|
||||
setComplete();
|
||||
endTransaction(); // Should rollback
|
||||
endTransaction(); // Should roll back
|
||||
assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1);
|
||||
|
||||
// Now clean up the database
|
||||
|
||||
@@ -138,7 +138,7 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit
|
||||
|
||||
doInstantiateAndSave(em);
|
||||
setComplete();
|
||||
endTransaction(); // Should rollback
|
||||
endTransaction(); // Should roll back
|
||||
assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1);
|
||||
|
||||
// Now clean up the database
|
||||
@@ -149,7 +149,7 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit
|
||||
public void testRollbackOccurs() {
|
||||
EntityManager em = createContainerManagedEntityManager();
|
||||
doInstantiateAndSave(em);
|
||||
endTransaction(); // Should rollback
|
||||
endTransaction(); // Should roll back
|
||||
assertThat(countRowsInTable(em, "person")).as("Tx must have been rolled back").isEqualTo(0);
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit
|
||||
EntityManager em = createContainerManagedEntityManager();
|
||||
doInstantiateAndSave(em);
|
||||
setComplete();
|
||||
endTransaction(); // Should rollback
|
||||
endTransaction(); // Should roll back
|
||||
assertThat(countRowsInTable(em, "person")).as("Tx must have committed back").isEqualTo(1);
|
||||
|
||||
// Now clean up the database
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.springframework.beans.testfixture.beans.TestBean;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
/**
|
||||
* Simple JavaBean domain object representing an person.
|
||||
* Simple JavaBean domain object representing a person.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user