@@ -2187,6 +2187,12 @@ public void dropNamespace_WithNonScalarDBTableLeftForOracle_ShouldThrowIllegalAr
21872187 RdbEngine .ORACLE );
21882188 }
21892189
2190+ @ Test
2191+ public void dropNamespace_WithNonScalarDBTableLeftForSqlite_ShouldThrowIllegalArgumentException ()
2192+ throws Exception {
2193+ // Do nothing. SQLite does not have a concept of namespaces.
2194+ }
2195+
21902196 @ Test
21912197 public void dropNamespace_WithNonScalarDBTableLeftForDb2_ShouldThrowIllegalArgumentException ()
21922198 throws Exception {
@@ -2203,19 +2209,14 @@ private void dropNamespace_WithNonScalarDBTableLeftForX_ShouldThrowIllegalArgume
22032209 Statement dropNamespaceStatementMock = mock (Statement .class );
22042210 PreparedStatement deleteFromNamespaceTableMock = mock (PreparedStatement .class );
22052211 Statement selectNamespaceStatementMock = mock (Statement .class );
2206- if (rdbEngine != RdbEngine .SQLITE ) {
2207- PreparedStatement getTableNamesPrepStmt = mock (PreparedStatement .class );
2208- when (connection .createStatement ())
2209- .thenReturn (dropNamespaceStatementMock , selectNamespaceStatementMock );
2210- ResultSet emptyResultSet = mock (ResultSet .class );
2211- when (emptyResultSet .next ()).thenReturn (true ).thenReturn (false );
2212- when (getTableNamesPrepStmt .executeQuery ()).thenReturn (emptyResultSet );
2213- when (connection .prepareStatement (anyString ()))
2214- .thenReturn (getTableNamesPrepStmt , deleteFromNamespaceTableMock );
2215- } else {
2216- when (connection .createStatement ()).thenReturn (selectNamespaceStatementMock );
2217- when (connection .prepareStatement (anyString ())).thenReturn (deleteFromNamespaceTableMock );
2218- }
2212+ PreparedStatement getTableNamesPrepStmt = mock (PreparedStatement .class );
2213+ when (connection .createStatement ())
2214+ .thenReturn (dropNamespaceStatementMock , selectNamespaceStatementMock );
2215+ ResultSet emptyResultSet = mock (ResultSet .class );
2216+ when (emptyResultSet .next ()).thenReturn (true ).thenReturn (false );
2217+ when (getTableNamesPrepStmt .executeQuery ()).thenReturn (emptyResultSet );
2218+ when (connection .prepareStatement (anyString ()))
2219+ .thenReturn (getTableNamesPrepStmt , deleteFromNamespaceTableMock );
22192220 when (dataSource .getConnection ()).thenReturn (connection );
22202221 // Namespaces table does not contain other namespaces
22212222 ResultSet resultSet = mock (ResultSet .class );
0 commit comments