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 "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2012/04/23 13:15:35 UTC
[jira] [Created] (DERBY-5704) Various cleanups in CoalesceTest
Knut Anders Hatlen created DERBY-5704:
-----------------------------------------
Summary: Various cleanups in CoalesceTest
Key: DERBY-5704
URL: https://issues.apache.org/jira/browse/DERBY-5704
Project: Derby
Issue Type: Improvement
Components: Test
Affects Versions: 10.9.0.0
Reporter: Knut Anders Hatlen
Assignee: Knut Anders Hatlen
Priority: Minor
I noticed a couple of things that could be cleaned up in CoalesceTest:
- It keeps statements in instance variables. These are closed in tearDown(), but not nulled out, so they are not gc'ed when the test completes.
- It has much code that follows the pattern
try {
s.execute(...);
} catch (SQLException sqle) {
assertSQLState(state, sqle);
}
which means it won't report a failure if the execution of the statement succeeds unexpectedly.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (DERBY-5704) Various cleanups in CoalesceTest
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-5704:
--------------------------------------
Attachment: d5704-1a.diff
The attached patch makes the following changes:
- Remove the instance variables s and ps, and instead create local variables where needed. This allows us to remove setUp() and tearDown(), and not worrying about closing/nulling out the statements.
- Replace try/catch/assertSQLState with assertCompileError() and assertStatementError() where possible.
- Add missing fail() call to remaining try/catch/assertSQLState blocks.
> Various cleanups in CoalesceTest
> --------------------------------
>
> Key: DERBY-5704
> URL: https://issues.apache.org/jira/browse/DERBY-5704
> Project: Derby
> Issue Type: Improvement
> Components: Test
> Affects Versions: 10.9.0.0
> Reporter: Knut Anders Hatlen
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Attachments: d5704-1a.diff
>
>
> I noticed a couple of things that could be cleaned up in CoalesceTest:
> - It keeps statements in instance variables. These are closed in tearDown(), but not nulled out, so they are not gc'ed when the test completes.
> - It has much code that follows the pattern
> try {
> s.execute(...);
> } catch (SQLException sqle) {
> assertSQLState(state, sqle);
> }
> which means it won't report a failure if the execution of the statement succeeds unexpectedly.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (DERBY-5704) Various cleanups in CoalesceTest
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen closed DERBY-5704.
-------------------------------------
Resolution: Fixed
Fix Version/s: 10.9.0.0
Issue & fix info: (was: Patch Available)
Committed revision 1330195.
> Various cleanups in CoalesceTest
> --------------------------------
>
> Key: DERBY-5704
> URL: https://issues.apache.org/jira/browse/DERBY-5704
> Project: Derby
> Issue Type: Improvement
> Components: Test
> Affects Versions: 10.9.0.0
> Reporter: Knut Anders Hatlen
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Fix For: 10.9.0.0
>
> Attachments: d5704-1a.diff
>
>
> I noticed a couple of things that could be cleaned up in CoalesceTest:
> - It keeps statements in instance variables. These are closed in tearDown(), but not nulled out, so they are not gc'ed when the test completes.
> - It has much code that follows the pattern
> try {
> s.execute(...);
> } catch (SQLException sqle) {
> assertSQLState(state, sqle);
> }
> which means it won't report a failure if the execution of the statement succeeds unexpectedly.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (DERBY-5704) Various cleanups in CoalesceTest
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-5704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-5704:
--------------------------------------
Issue & fix info: Patch Available
> Various cleanups in CoalesceTest
> --------------------------------
>
> Key: DERBY-5704
> URL: https://issues.apache.org/jira/browse/DERBY-5704
> Project: Derby
> Issue Type: Improvement
> Components: Test
> Affects Versions: 10.9.0.0
> Reporter: Knut Anders Hatlen
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Attachments: d5704-1a.diff
>
>
> I noticed a couple of things that could be cleaned up in CoalesceTest:
> - It keeps statements in instance variables. These are closed in tearDown(), but not nulled out, so they are not gc'ed when the test completes.
> - It has much code that follows the pattern
> try {
> s.execute(...);
> } catch (SQLException sqle) {
> assertSQLState(state, sqle);
> }
> which means it won't report a failure if the execution of the statement succeeds unexpectedly.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira