You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dag H. Wanvik" <Da...@Sun.COM> on 2009/10/08 01:13:53 UTC
Re: svn commit: r822641 -
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SequenceTest.java
ole@apache.org writes:
> - public void testDuplicateCreationFailure() {
> + public void testDuplicateCreationFailure() throws SQLException {
> + Statement s = null;
> try {
> - Statement s = createStatement();
> + s = createStatement();
> s.executeUpdate("CREATE SEQUENCE mySeq1");
> s.executeUpdate("CREATE SEQUENCE mySeq1");
Shouldn't there be a call to fail() here? If duplicate creation
succeeds, the test will silently pass. Not your patch, though, just
noticed reading it.
> } catch (SQLException sqle) {
> assertSQLState("X0Y68", sqle);
> + }finally{
> + s.executeUpdate("DROP SEQUENCE mySeq1"); // Drop the one created.
> }
> }