db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5305) Convert store/updatelocks.sql to JUnit
Date Wed, 29 Jun 2011 13:42:28 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13057229#comment-13057229

Knut Anders Hatlen commented on DERBY-5305:

Whoa! A 2.68 MB patch! :D

The new test looks clean and systematic, so I'd say commit it. I must admit I haven't read
every single line of the patch, but just to prove that I have looked at it, here are my nit-picks:

- In decorateSQL(), auto-commit is turned off and commit() is called explicitly at the end
of the method. This is not necessary, since CleanDatabaseTestSetup already turns off auto-commit
before calling decorateSQL() and commits immediately afterwards.

- Most of the code in decorateSQL() is commented out. Could it be removed?

- One of the added lines in JDBC.java has trailing blanks.

- In tearDown(), I'd suggest using the helper method BaseJDBCTestCase.dropTable().

- Closing getLocksQuery in tearDown() shouldn't be necessary since it was created with BaseJDBCTestCase.prepareStatement()
and will be closed in super.tearDown(). Setting the reference to null would be good, though,
so that the statement and the connection can be garbage collected after the test case has

> Convert store/updatelocks.sql to JUnit
> --------------------------------------
>                 Key: DERBY-5305
>                 URL: https://issues.apache.org/jira/browse/DERBY-5305
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-5305-a.diff, derby-5305-a.stat

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message