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 "Mamta A. Satoor (JIRA)" <ji...@apache.org> on 2007/11/06 18:08:50 UTC

[jira] Created: (DERBY-3178) DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired

DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired
--------------------------------------------------------------------------------------------

                 Key: DERBY-3178
                 URL: https://issues.apache.org/jira/browse/DERBY-3178
             Project: Derby
          Issue Type: Test
          Components: Test
    Affects Versions: 10.4.0.0
            Reporter: Mamta A. Satoor
            Assignee: Mamta A. Satoor


Derby has a junit test called DataSourceTest in jdbcapi package. This test registers ConnectionEventListener for various Connection objects but never verifies that events from those Connection objects are getting delivered to the listeners. Prior to this test's conversion to junit, there were System.out.println in the test but since this test is not cannon based anymore, those printlns have been commented out. I will soon submit a patch where this test will have asserts to make sure that Connection events are getting fired.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DERBY-3178) DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired

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

Mamta A. Satoor resolved DERBY-3178.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.4.0.0
                   10.3.2.0

> DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired
> --------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3178
>                 URL: https://issues.apache.org/jira/browse/DERBY-3178
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>    Affects Versions: 10.4.0.0
>            Reporter: Mamta A. Satoor
>            Assignee: Mamta A. Satoor
>             Fix For: 10.3.2.0, 10.4.0.0
>
>         Attachments: DERBY_3178_diff_ver1_Nov_06_2007.txt
>
>
> Derby has a junit test called DataSourceTest in jdbcapi package. This test registers ConnectionEventListener for various Connection objects but never verifies that events from those Connection objects are getting delivered to the listeners. Prior to this test's conversion to junit, there were System.out.println in the test but since this test is not cannon based anymore, those printlns have been commented out. I will soon submit a patch where this test will have asserts to make sure that Connection events are getting fired.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3178) DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540580 ] 

Mamta A. Satoor commented on DERBY-3178:
----------------------------------------

Merged changes into 10.3 codeline using 592561. I will go ahead and close this Jira entry. I am not planning on migrating this to 10.2 and older codelines but if someone thinks it will be useful to backport to codelines older than 10.3, I can do that.

> DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired
> --------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3178
>                 URL: https://issues.apache.org/jira/browse/DERBY-3178
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>    Affects Versions: 10.4.0.0
>            Reporter: Mamta A. Satoor
>            Assignee: Mamta A. Satoor
>         Attachments: DERBY_3178_diff_ver1_Nov_06_2007.txt
>
>
> Derby has a junit test called DataSourceTest in jdbcapi package. This test registers ConnectionEventListener for various Connection objects but never verifies that events from those Connection objects are getting delivered to the listeners. Prior to this test's conversion to junit, there were System.out.println in the test but since this test is not cannon based anymore, those printlns have been commented out. I will soon submit a patch where this test will have asserts to make sure that Connection events are getting fired.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (DERBY-3178) DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired

Posted by Mamta Satoor <ms...@gmail.com>.
Dag, I am working on DERBY-3172 and as part of that jira entry, I plan
to add test cases for Connection error event.

thanks,
Mamta

On 11/8/07, Dag H. Wanvik <Da...@sun.com> wrote:
> "Mamta A. Satoor (JIRA)" <ji...@apache.org> writes:
>
> > I forgot to mention that I didn't find any test case in
> > DataSourceTest.java which will trigger Connection error event. The
> > existing test cases only test Connection closed event.
>
> It might be good to add a new jira for this improvement if it's not
> your present itch :)
>
> Dag
>

Re: [jira] Commented: (DERBY-3178) DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired

Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
"Mamta A. Satoor (JIRA)" <ji...@apache.org> writes:

> I forgot to mention that I didn't find any test case in
> DataSourceTest.java which will trigger Connection error event. The
> existing test cases only test Connection closed event.

It might be good to add a new jira for this improvement if it's not
your present itch :)

Dag

[jira] Commented: (DERBY-3178) DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired

Posted by "Mamta A. Satoor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540660 ] 

Mamta A. Satoor commented on DERBY-3178:
----------------------------------------

I forgot to mention that I didn't find any test case in DataSourceTest.java which will trigger Connection error event. The existing test cases only test Connection closed event.

> DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired
> --------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3178
>                 URL: https://issues.apache.org/jira/browse/DERBY-3178
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>    Affects Versions: 10.4.0.0
>            Reporter: Mamta A. Satoor
>            Assignee: Mamta A. Satoor
>             Fix For: 10.3.1.5, 10.4.0.0
>
>         Attachments: DERBY_3178_diff_ver1_Nov_06_2007.txt
>
>
> Derby has a junit test called DataSourceTest in jdbcapi package. This test registers ConnectionEventListener for various Connection objects but never verifies that events from those Connection objects are getting delivered to the listeners. Prior to this test's conversion to junit, there were System.out.println in the test but since this test is not cannon based anymore, those printlns have been commented out. I will soon submit a patch where this test will have asserts to make sure that Connection events are getting fired.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3178) DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired

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

Dag H. Wanvik updated DERBY-3178:
---------------------------------

    Issue Type: Bug  (was: Test)

> DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired
> --------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3178
>                 URL: https://issues.apache.org/jira/browse/DERBY-3178
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.4.1.3
>            Reporter: Mamta A. Satoor
>            Assignee: Mamta A. Satoor
>             Fix For: 10.3.2.1, 10.4.1.3
>
>         Attachments: DERBY_3178_diff_ver1_Nov_06_2007.txt
>
>
> Derby has a junit test called DataSourceTest in jdbcapi package. This test registers ConnectionEventListener for various Connection objects but never verifies that events from those Connection objects are getting delivered to the listeners. Prior to this test's conversion to junit, there were System.out.println in the test but since this test is not cannon based anymore, those printlns have been commented out. I will soon submit a patch where this test will have asserts to make sure that Connection events are getting fired.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3178) DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired

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

Mamta A. Satoor updated DERBY-3178:
-----------------------------------

    Fix Version/s:     (was: 10.3.2.0)
                   10.3.1.5

> DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired
> --------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3178
>                 URL: https://issues.apache.org/jira/browse/DERBY-3178
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>    Affects Versions: 10.4.0.0
>            Reporter: Mamta A. Satoor
>            Assignee: Mamta A. Satoor
>             Fix For: 10.3.1.5, 10.4.0.0
>
>         Attachments: DERBY_3178_diff_ver1_Nov_06_2007.txt
>
>
> Derby has a junit test called DataSourceTest in jdbcapi package. This test registers ConnectionEventListener for various Connection objects but never verifies that events from those Connection objects are getting delivered to the listeners. Prior to this test's conversion to junit, there were System.out.println in the test but since this test is not cannon based anymore, those printlns have been commented out. I will soon submit a patch where this test will have asserts to make sure that Connection events are getting fired.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3178) DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired

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

Mamta A. Satoor updated DERBY-3178:
-----------------------------------

    Attachment: DERBY_3178_diff_ver1_Nov_06_2007.txt

Committed attached patch DERBY_3178_diff_ver1_Nov_06_2007.txt to trunk using revision 592544. The commit comments which describes the fix are as follows

DERBY-3178
This commit modifies DataSourceTest.java to ensure that expected Connection events are fired to the
ConnectionEventListener. The changes have been implemented by having AssertEventCatcher in DataSourceTest.java keep track of what events it received. This state is kept in boolean gotConnectionClosed and boolean gotConnectionErrorOccured flags in AssertEventCatcher. The test then checks the state of AssertEventCatcher after the test has done firing the events to make sure AssertEventCatcher got the expected events.


> DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired
> --------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3178
>                 URL: https://issues.apache.org/jira/browse/DERBY-3178
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>    Affects Versions: 10.4.0.0
>            Reporter: Mamta A. Satoor
>            Assignee: Mamta A. Satoor
>         Attachments: DERBY_3178_diff_ver1_Nov_06_2007.txt
>
>
> Derby has a junit test called DataSourceTest in jdbcapi package. This test registers ConnectionEventListener for various Connection objects but never verifies that events from those Connection objects are getting delivered to the listeners. Prior to this test's conversion to junit, there were System.out.println in the test but since this test is not cannon based anymore, those printlns have been commented out. I will soon submit a patch where this test will have asserts to make sure that Connection events are getting fired.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.