db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew McIntyre (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-950) Add information to testing/README.htm about how to get connections in tests
Date Tue, 08 Aug 2006 07:15:14 GMT
    [ http://issues.apache.org/jira/browse/DERBY-950?page=comments#action_12426482 ] 
Andrew McIntyre commented on DERBY-950:

Hi Deepa,

These comments are ok as they pertain to the old method of writing tests. As for writing new
tests with junit, a note should be added that describes how to use the BaseJDBCTestSetup test
decorator to get the connection for tests. See tests/jdbcapi/ProcedureTest.java for an example.
I believe this is now the preferred method for getting a connection for a test. ProcedureTest's
usage is a bit involved, since it uses an additional anonymous class that extends the setUp
and tearDown methods in the containing class. It would be nice if there were a simpler example
to point to for writing new tests that use BaseJDBCTestSetup.

On a related note, functionTests/util/ProcedureTest.java, which contains Java procedures called
by tests, has the same name as functionTests/tests/jdbcapi/ProcedureTest.java. I think the
class in util should probably be named DerbyTestProcedures, or something similar, although
changing its name would require changing several few tests and their associated output files.
Maybe ProcedureTest should be called ProcedureExecutionTest, or something similar? Anyway,
outside the scope of this issue, but worth mentioning.

> Add information to testing/README.htm about how to get connections in tests
> ---------------------------------------------------------------------------
>                 Key: DERBY-950
>                 URL: http://issues.apache.org/jira/browse/DERBY-950
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>    Affects Versions:
>            Reporter: Deepa Remesh
>            Priority: Minor
>             Fix For:
> Currently testing/README.htm has a section "Adding a new test". Add a sub-section to
describe how to get connections inside tests so that the test can run in different frameworks/environments.

> Also it would be good to describe use of properties like ij.database and ij.dataSource.
These are already documented/planned to be documented in Derby Tools and Utilities guide but
I think it would be useful to have an overview in the readme file about how to use these properties
when writing tests. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message