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 "Deepa Remesh (JIRA)" <de...@db.apache.org> on 2006/02/10 23:33:07 UTC

[jira] Created: (DERBY-950) Add information to testing/README.htm about how to get connections in tests

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
        Type: Test
  Components: Test  
    Versions: 10.2.0.0    
    Reporter: Deepa Remesh
    Priority: Minor
     Fix For: 10.2.0.0


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


[jira] Commented: (DERBY-950) Add information to testing/README.htm about how to get connections in tests

Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-950?page=comments#action_12426620 ] 
            
Deepa Remesh commented on DERBY-950:
------------------------------------

Thanks Andrew for looking at this. My comments were based on the old method and may be soon outdated as we are moving to JUnit tests. I'll take a look at JUnit tests to see what can be added. I see that most of the information pertaining to JUnit tests is on the Wiki. So it may be better to add the JUnit specific info to the Wiki. Later, we can get all of the information together into the readme. What do you think?





> 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: 10.2.0.0
>            Reporter: Deepa Remesh
>            Priority: Minor
>             Fix For: 10.2.0.0
>
>
> 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

        

[jira] Commented: (DERBY-950) Add information to testing/README.htm about how to get connections in tests

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-950?page=comments#action_12426627 ] 
            
Andrew McIntyre commented on DERBY-950:
---------------------------------------

Sounds like a good plan: let the information evolve on the wiki and then capture it as static HTML once its mature. Should we close this issue, then?

> 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: 10.2.0.0
>            Reporter: Deepa Remesh
>            Priority: Minor
>             Fix For: 10.2.0.0
>
>
> 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

        

[jira] Commented: (DERBY-950) Add information to testing/README.htm about how to get connections in tests

Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-950?page=comments#action_12372446 ] 

Deepa Remesh commented on DERBY-950:
------------------------------------

Please see if following content is okay to be added to the testing readme file:

---------------------------------------------------------------------
How to get database connections in tests:
---------------------------------------------------------------------

When getting database connections inside tests, it is recommended to use the following methods:

* ij.startJBMS:
This method gets a connection based on the  system properties and properties specified in the test properties file (<test>_app.properties). If ij.dataSource property is set, this method uses javax.sql.DataSource class to get the connection. If ij.dataSource property is not set, this method uses java.sql.DriverManager for connection. Unless a test needs to specifically test a particular method to get connection, it is recommended to use ij.startJBMS method and specify the properties like database name, connection attributes etc in <test_name>_app.properties file. 

NOTE: Use ij.database and ij.protocol properties instead of the deprecated database and protocol properties to allow the test to run in J2ME/CDC/Foundation profile with JSR169. This is because test harness removes ij.database and ij.protocol propeties when the test is launched with ij.dataSource property and thus allows the test to run with JSR169. 

* TestUtil.getConnection:
If a test needs a connection (usually a subsequent connection) which needs to use a different set of properties than what is specified in <test_name>_app.properties, the method TestUtil.getConnection can be used. For e.g, this method can be used to shutdown a database or recover a database by specifying the relevant connection atributes.

> 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
>         Type: Test
>   Components: Test
>     Versions: 10.2.0.0
>     Reporter: Deepa Remesh
>     Priority: Minor
>      Fix For: 10.2.0.0

>
> 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


[jira] Updated: (DERBY-950) Add information to testing/README.htm about how to get connections in tests

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-950?page=all ]

Rick Hillegas updated DERBY-950:
--------------------------------

    Urgency: Low

> 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: 10.2.0.0
>            Reporter: Deepa Remesh
>            Priority: Minor
>             Fix For: 10.2.0.0
>
>
> 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

        

[jira] Closed: (DERBY-950) Add information to testing/README.htm about how to get connections in tests

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren closed DERBY-950.
------------------------------------

    Resolution: Won't Fix

This issue is of less interest now that we're pushing to move to junit.

> Add information to testing/README.htm about how to get connections in tests
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-950
>                 URL: https://issues.apache.org/jira/browse/DERBY-950
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>    Affects Versions: 10.2.1.6
>            Reporter: Deepa Remesh
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-950) Add information to testing/README.htm about how to get connections in tests

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
    [ 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: 10.2.0.0
>            Reporter: Deepa Remesh
>            Priority: Minor
>             Fix For: 10.2.0.0
>
>
> 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

        

[jira] Updated: (DERBY-950) Add information to testing/README.htm about how to get connections in tests

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-950?page=all ]

Andrew McIntyre updated DERBY-950:
----------------------------------

    Fix Version/s: 10.3.0.0
                       (was: 10.2.0.0)

Pushing to 10.3. Issue might need to be closed due to recent push for JUnit tests.

> 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: 10.2.0.0
>            Reporter: Deepa Remesh
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>
> 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