Skip to content

Commit

Permalink
TRUNK-5980: BaseContextSensitiveTest to allow further protected overr…
Browse files Browse the repository at this point in the history
…ides. (#3664)

* TRUNK-5980:BaseContextSensitiveTest to allow Protected overrides

* Updating the commit
  • Loading branch information
sherrif10 authored Dec 16, 2020
1 parent 6f82d82 commit 743de0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -620,14 +620,13 @@ protected void dropNotNullConstraint(String tableName, String columnName) throws
final String sql = "ALTER TABLE " + tableName + " ALTER COLUMN " + columnName + " SET NULL";
DatabaseUtil.executeSQL(getConnection(), sql, false);
}

/**
* Note that with the H2 DB this operation always commits an open transaction.
*
* @param connection
* @throws SQLException
*/
private void turnOnDBConstraints(Connection connection) throws SQLException {
protected void turnOnDBConstraints(Connection connection) throws SQLException {
String constraintsOnSql;
if (useInMemoryDatabase()) {
constraintsOnSql = "SET REFERENTIAL_INTEGRITY TRUE";
Expand All @@ -639,7 +638,7 @@ private void turnOnDBConstraints(Connection connection) throws SQLException {
ps.close();
}

private void turnOffDBConstraints(Connection connection) throws SQLException {
protected void turnOffDBConstraints(Connection connection) throws SQLException {
String constraintsOffSql;
if (useInMemoryDatabase()) {
constraintsOffSql = "SET REFERENTIAL_INTEGRITY FALSE";
Expand Down Expand Up @@ -824,7 +823,7 @@ public void executeDataSet(IDataSet dataset) {
}
}

private IDatabaseConnection setupDatabaseConnection(Connection connection) throws DatabaseUnitException {
protected IDatabaseConnection setupDatabaseConnection(Connection connection) throws DatabaseUnitException {
IDatabaseConnection dbUnitConn = new DatabaseConnection(connection);

if (useInMemoryDatabase()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ protected void dropNotNullConstraint(String tableName, String columnName) throws
* @param connection
* @throws SQLException
*/
private void turnOnDBConstraints(Connection connection) throws SQLException {
protected void turnOnDBConstraints(Connection connection) throws SQLException {
String constraintsOnSql;
if (useInMemoryDatabase()) {
constraintsOnSql = "SET REFERENTIAL_INTEGRITY TRUE";
Expand All @@ -632,7 +632,7 @@ private void turnOnDBConstraints(Connection connection) throws SQLException {
ps.close();
}

private void turnOffDBConstraints(Connection connection) throws SQLException {
protected void turnOffDBConstraints(Connection connection) throws SQLException {
String constraintsOffSql;
if (useInMemoryDatabase()) {
constraintsOffSql = "SET REFERENTIAL_INTEGRITY FALSE";
Expand Down Expand Up @@ -817,7 +817,7 @@ public void executeDataSet(IDataSet dataset) {
}
}

private IDatabaseConnection setupDatabaseConnection(Connection connection) throws DatabaseUnitException {
protected IDatabaseConnection setupDatabaseConnection(Connection connection) throws DatabaseUnitException {
IDatabaseConnection dbUnitConn = new DatabaseConnection(connection);

if (useInMemoryDatabase()) {
Expand Down

0 comments on commit 743de0d

Please sign in to comment.