Skip to content

Commit b147433

Browse files
committedMar 19, 2013
Database constraints should be turned off when executing datasets in
unit tests - TRUNK-3928
1 parent a7895e1 commit b147433

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎api/src/test/java/org/openmrs/test/BaseContextSensitiveTest.java

+4
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,13 @@ public void executeDataSet(IDataSet dataset) throws Exception {
610610

611611
IDatabaseConnection dbUnitConn = setupDatabaseConnection(connection);
612612

613+
turnOffDBConstraints(connection);
614+
613615
//Do the actual update/insert:
614616
//insert new rows, update existing rows, and leave others alone
615617
DatabaseOperation.REFRESH.execute(dbUnitConn, dataset);
618+
619+
turnOnDBConstraints(connection);
616620
}
617621

618622
private IDatabaseConnection setupDatabaseConnection(Connection connection) throws DatabaseUnitException {

0 commit comments

Comments
 (0)
Please sign in to comment.