You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by da...@apache.org on 2014/05/13 17:51:33 UTC
svn commit: r1594255 - in
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang:
ConstraintCharacteristicsTest.java ForeignKeysDeferrableTest.java
Author: dag
Date: Tue May 13 15:51:33 2014
New Revision: 1594255
URL: http://svn.apache.org/r1594255
Log:
DERBY-532 Support deferrable constraints
Substituted BaseJDBCTestCase#dropTable for home grown version, we
prefer the standard way to do it.
Modified:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ConstraintCharacteristicsTest.java
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ForeignKeysDeferrableTest.java
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ConstraintCharacteristicsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ConstraintCharacteristicsTest.java?rev=1594255&r1=1594254&r2=1594255&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ConstraintCharacteristicsTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ConstraintCharacteristicsTest.java Tue May 13 15:51:33 2014
@@ -830,7 +830,7 @@ public class ConstraintCharacteristicsTe
} finally {
idx++;
- dontThrow(s, "drop table t");
+ dropTable("t");
commit();
}
}
@@ -996,7 +996,7 @@ public class ConstraintCharacteristicsTe
} finally {
idx++;
- dontThrow(s, "drop table t");
+ dropTable("t");
commit();
}
}
@@ -1032,7 +1032,7 @@ public class ConstraintCharacteristicsTe
s,
"call calledNested(false)");
} finally {
- dontThrow(s, "drop table t");
+ dropTable("t");
}
}
@@ -1053,7 +1053,7 @@ public class ConstraintCharacteristicsTe
s,
"call calledNested(false)");
} finally {
- dontThrow(s, "drop table t");
+ dropTable("t");
commit();
}
}
@@ -1095,7 +1095,7 @@ public class ConstraintCharacteristicsTe
s,
"call calledNested(true)");
} finally {
- dontThrow(s, "drop table t");
+ dropTable("t");
commit();
}
}
@@ -1117,7 +1117,7 @@ public class ConstraintCharacteristicsTe
s,
"call calledNested(true)");
} finally {
- dontThrow(s, "drop table t");
+ dropTable("t");
commit();
}
}
@@ -1172,7 +1172,7 @@ public class ConstraintCharacteristicsTe
s,
"call calledNestedFk()");
} finally {
- dontThrow(s, "drop table t");
+ dropTable("t");
dontThrow(s, "delete from referenced");
commit();
}
@@ -1197,7 +1197,7 @@ public class ConstraintCharacteristicsTe
s,
"call calledNestedFk()");
} finally {
- dontThrow(s, "drop table t");
+ dropTable("t");
dontThrow(s, "delete from referenced");
commit();
}
@@ -1588,7 +1588,7 @@ public class ConstraintCharacteristicsTe
commit();
}
} finally {
- dontThrow(s, "drop table t");
+ dropTable("t");
commit();
}
}
@@ -1648,7 +1648,7 @@ public class ConstraintCharacteristicsTe
s.executeUpdate("alter table t drop constraint c");
}
} finally {
- dontThrow(s, "drop table t");
+ dropTable("t");
commit();
}
}
@@ -1863,7 +1863,7 @@ public class ConstraintCharacteristicsTe
} catch (SQLException e) {
assertSQLState(LANG_DEFERRED_DUP_VIOLATION_T, e);
} finally {
- dontThrow(s, "drop table t");
+ dropTable("t");
commit();
}
}
@@ -2023,8 +2023,8 @@ public class ConstraintCharacteristicsTe
getConnection());
} finally {
// clean up
- dontThrow(s, "drop table tab1");
- dontThrow(s, "drop table trigtab");
+ dropTable("tab1");
+ dropTable("trigtab");
commit();
}
}
@@ -2102,7 +2102,7 @@ public class ConstraintCharacteristicsTe
getConnection());
} finally {
- dontThrow(s, "drop table t");
+ dropTable("t");
commit();
}
}
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ForeignKeysDeferrableTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ForeignKeysDeferrableTest.java?rev=1594255&r1=1594254&r2=1594255&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ForeignKeysDeferrableTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ForeignKeysDeferrableTest.java Tue May 13 15:51:33 2014
@@ -224,20 +224,20 @@ public class ForeignKeysDeferrableTest e
rollback();
setAutoCommit(true);
Statement s = createStatement();
- dontThrow(s, "drop table t_d_r ");
- dontThrow(s, "drop table t_d_c ");
- dontThrow(s, "drop table t_d_na ");
- dontThrow(s, "drop table t_d_nu ");
- dontThrow(s, "drop table t_u_r ");
- dontThrow(s, "drop table t_u_na ");
-
- dontThrow(s, "drop table ref_d_r");
- dontThrow(s, "drop table ref_d_c");
- dontThrow(s, "drop table ref_d_na");
- dontThrow(s, "drop table ref_d_nu");
+ dropTable("t_d_r");
+ dropTable("t_d_c");
+ dropTable("t_d_na");
+ dropTable("t_d_nu");
+ dropTable("t_u_r");
+ dropTable("t_u_na");
+
+ dropTable("ref_d_r");
+ dropTable("ref_d_c");
+ dropTable("ref_d_na");
+ dropTable("ref_d_nu");
- dontThrow(s, "drop table ref_u_r");
- dontThrow(s, "drop table ref_u_na");
+ dropTable("ref_u_r");
+ dropTable("ref_u_na");
super.tearDown();
}
@@ -796,7 +796,7 @@ public class ForeignKeysDeferrableTest e
} finally {
- dontThrow(s, "drop table t2");
+ dropTable("t2");
commit();
}
}
@@ -875,19 +875,9 @@ public class ForeignKeysDeferrableTest e
commit();
} finally {
- dontThrow(s, "drop table t");
- dontThrow(s, "drop table ref_t");
+ dropTable("t");
+ dropTable("ref_t");
commit();
}
-
- }
-
- private void dontThrow(Statement st, String stm) {
- try {
- st.executeUpdate(stm);
- } catch (SQLException e) {
- // ignore, best effort here
- println("\"" + stm+ "\"failed: " + e);
- }
}
}