db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Van Couvering (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-819) Provide JDBC4 SQLException subclasses support in Embedded driver
Date Wed, 18 Jan 2006 23:55:43 GMT
    [ http://issues.apache.org/jira/browse/DERBY-819?page=comments#action_12363187 ] 

David Van Couvering commented on DERBY-819:

Hi, Anurag,  Thanksk for this patch.  In general this looks pretty straightforward.

Here are some comments

- It would be great if the new code you write does not go beyond 80 characters per line. 
There is enough code in Derby already that goes far beyond a page width, making it very hard
to read.

In TestException:
- Most tests make use of an existing framework for getting an embedded connection: 

		Connection dmc = ij.startJBMS();

This way the same test can be used for both embedded and (when it's ready) the network client.

- If you want to set the waitTimeout to be a certain value, you can set it in the TestException_app.properties
file, rather than hardcode it into the test.

- Why do you set the territory to en_US?

- It's IntegrityConstraintViolation, not IntigrityContstrainsViolation

- Any reason why this test can't be a JUnit Test?

- I would prefer to see less tests depending on canons instead of more.  Can this test be
"silent" unless an error occurs, like most JUnit tests?  So, for example, instead of catching
the exception and printing out the SQLState and error code , you can just catch the exception
and move on.  An unexpected exception will be thrown by this method and will be detected as
a failure.  If you want to ensure the SQL State is correct

- I think this test should be named TestJDBC4Exceptions because it's focusing on the SQLException
subclasses.  It's not a generic exception test.

- In the initDB method, you don't drop the table before creating it.  What if you run the
same test twice without deleting the database?  Or does our test infrastructure take care
of that?



> Provide JDBC4 SQLException subclasses support in Embedded driver
> ----------------------------------------------------------------
>          Key: DERBY-819
>          URL: http://issues.apache.org/jira/browse/DERBY-819
>      Project: Derby
>         Type: Sub-task
>   Components: JDBC
>  Environment: all
>     Reporter: Anurag Shekhar
>     Assignee: Anurag Shekhar
>     Priority: Minor
>  Attachments: derby-819.diff, stat.out

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message