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 "Manjula Kutty (JIRA)" <ji...@apache.org> on 2007/02/01 21:44:06 UTC

[jira] Created: (DERBY-2283) convert lang/currentof.java test junit

convert lang/currentof.java test junit
--------------------------------------

                 Key: DERBY-2283
                 URL: https://issues.apache.org/jira/browse/DERBY-2283
             Project: Derby
          Issue Type: Test
            Reporter: Manjula Kutty
         Assigned To: Manjula Kutty
            Priority: Minor
             Fix For: 10.3.0.0


Using this Jira entry to attach the converted test in future

-- 
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-2283) convert lang/currentof.java test to junit test

Posted by Manjula Kutty <ma...@gmail.com>.
On 2/2/07, Mamta A. Satoor (JIRA) <ji...@apache.org> wrote:
>
>
>    [
> https://issues.apache.org/jira/browse/DERBY-2283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469887]
>
> Mamta A. Satoor commented on DERBY-2283:
> ----------------------------------------
>
> Manjula, just an FYI and it is not a biggie but if you use svn stat -q,
> then you won't get following kind of output.
> ?      test
> ?      .project
> ?      system
> ?      .externalToolBuilders
> ?      .classpath
> ?      svn_stat_02_02
> ?      logs
> ?      svn_diff_02_02.txt
>
>
> > convert lang/currentof.java test to junit test
> > ----------------------------------------------
> >
> >                 Key: DERBY-2283
> >                 URL: https://issues.apache.org/jira/browse/DERBY-2283
> >             Project: Derby
> >          Issue Type: Test
> >            Reporter: Manjula Kutty
> >         Assigned To: Manjula Kutty
> >            Priority: Minor
> >             Fix For: 10.3.0.0
> >
> >         Attachments: _Suite.java, CurrentOfTest.java,
> svn_diff_02_02.txt, svn_stat_02_02.txt
> >
> >
> > Using this Jira entry to attach the converted test in future
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
Hi Mamta,

Thanks for pointing me that. I tried ot get rid of it for sometime and
couldn't do. I will do svn stat -q to get the stat file in future

Thanks
Manjula

[jira] Commented: (DERBY-2283) convert lang/currentof.java test to junit test

Posted by "Manjula Kutty (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478124 ] 

Manjula Kutty commented on DERBY-2283:
--------------------------------------

Will be attaching a new patch to address this issue

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, jira_2283_.diff.txt, jira_2283_02_08_diff.txt, jira_2283_02_08_stat.txt, jira_2283_stat.txt, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Commented: (DERBY-2283) convert lang/currentof.java test to junit test

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469893 ] 

Daniel John Debrunner commented on DERBY-2283:
----------------------------------------------

Patch Committed revision 502769 - Thanks Manjula.

The test is lacking javadoc comments on the class and fixture methods, if you gained any knowledge during the conversion it would be great if you could find time to save that knowledge as comments. Even an overview in the class javadoc of what the test is covering would be good.

I think the remaining try/catch blocks could all use the JDBC.assertStatementError() utility method, thus cleaning up the test even more.

In earlier comments I think you had said that this is the type of language test that should run in client server as well, but it's only setup to run embedded. This would make it work in both:

    public static Test suite() {
        return TestConfiguration.defaultSuite(CurrentOfTest.class);
     }

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Updated: (DERBY-2283) convert lang/currentof.java test to junit test

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

Daniel John Debrunner updated DERBY-2283:
-----------------------------------------

    Derby Info:   (was: [Patch Available])

Patch committed - made two minor changes:
1) Moved the class comment to before the class definition so it is a javadoc comment for the class
2) renamed the suite to match the test name
Thanks Manjula.

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, jira_2283_.diff.txt, jira_2283_stat.txt, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Updated: (DERBY-2283) convert lang/currentof.java test to junit test

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

Kathey Marsden updated DERBY-2283:
----------------------------------

    Component/s: Test

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Manjula Kutty
>            Assignee: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.1.4
>
>         Attachments: _Suite.java, CurrentOfTest.java, DERBY-2283_diff_03_16.txt, DERBY-2283_stat_03_16.txt, jira_2283_.diff.txt, jira_2283_02_08_diff.txt, jira_2283_02_08_stat.txt, jira_2283_stat.txt, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Updated: (DERBY-2283) convert lang/currentof.java test to junit test

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

Manjula Kutty updated DERBY-2283:
---------------------------------

    Attachment: DERBY-2283_diff_03_16.txt
                DERBY-2283_stat_03_16.txt

Attaching the patch which will validate the rows to be deleted and updated. Please review and if looks fine please commit

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, DERBY-2283_diff_03_16.txt, DERBY-2283_stat_03_16.txt, jira_2283_.diff.txt, jira_2283_02_08_diff.txt, jira_2283_02_08_stat.txt, jira_2283_stat.txt, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Updated: (DERBY-2283) convert lang/currentof.java test to junit test

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

Manjula Kutty updated DERBY-2283:
---------------------------------

    Attachment: jira_2283_02_08_stat.txt
                jira_2283_02_08_diff.txt

Adding patches for the removal of old test files. The following files are deleted

java/testing/org/apache/derbyTesting/functionTests/tests/lang/currentof.java
java/testing/org/apache/derbyTesting/functionTests/tests/lang/currentof_derby.properties
java/testing/org/apache/derbyTesting/functionTests/master/currentof.out

Also removed the currentof.java from derbylang.runall file

Please review it and if every thing looks good, can any one please commit this patch?

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, jira_2283_.diff.txt, jira_2283_02_08_diff.txt, jira_2283_02_08_stat.txt, jira_2283_stat.txt, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Updated: (DERBY-2283) convert lang/currentof.java test to junit test

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

Kathey Marsden updated DERBY-2283:
----------------------------------

    Derby Info:   (was: [Patch Available])

committed  revision 520662 for this issue with patch DERBY-2283_diff_03_16.txt

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, DERBY-2283_diff_03_16.txt, DERBY-2283_stat_03_16.txt, jira_2283_.diff.txt, jira_2283_02_08_diff.txt, jira_2283_02_08_stat.txt, jira_2283_stat.txt, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Commented: (DERBY-2283) convert lang/currentof.java test to junit test

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

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

Manjula, just an FYI and it is not a biggie but if you use svn stat -q, then you won't get following kind of output. 
?      test
?      .project
?      system
?      .externalToolBuilders
?      .classpath
?      svn_stat_02_02
?      logs
?      svn_diff_02_02.txt


> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Updated: (DERBY-2283) convert lang/currentof.java test junit

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

Manjula Kutty updated DERBY-2283:
---------------------------------

    Attachment: _Suite.java
                CurrentOfTest.java

Attaching the CurrentOfTest.java for review. I ran the lang Suite and one test failed. It was UpdatableResultSetTest which timed out during getting a n/w server connection. This is my first attempt in conversion of tests to junit. 

> convert lang/currentof.java test junit
> --------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Reopened: (DERBY-2283) convert lang/currentof.java test to junit test

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

Daniel John Debrunner reopened DERBY-2283:
------------------------------------------


Test needs to ensure that the UPDATE and DELETE statements are updating and deleting the correct rows and for update to the correct values.

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, jira_2283_.diff.txt, jira_2283_02_08_diff.txt, jira_2283_02_08_stat.txt, jira_2283_stat.txt, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Resolved: (DERBY-2283) convert lang/currentof.java test to junit test

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

Manjula Kutty resolved DERBY-2283.
----------------------------------

    Resolution: Fixed

Thanks for the commit Kathey

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, DERBY-2283_diff_03_16.txt, DERBY-2283_stat_03_16.txt, jira_2283_.diff.txt, jira_2283_02_08_diff.txt, jira_2283_02_08_stat.txt, jira_2283_stat.txt, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Updated: (DERBY-2283) convert lang/currentof.java test to junit test

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

Manjula Kutty updated DERBY-2283:
---------------------------------

    Summary: convert lang/currentof.java test to junit test  (was: convert lang/currentof.java test junit)

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Updated: (DERBY-2283) convert lang/currentof.java test to junit test

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

Manjula Kutty updated DERBY-2283:
---------------------------------

    Attachment: jira_2283_stat.txt
                jira_2283_.diff.txt

I did svn delete to currentof.java and currentof_derby.properties. Ran the lang suite in the old harness and found some failures.  None are related to currentof.java removal. So attaching the modified test patch . I added some more assert methods for client/server mode, but have some problem, so making the test to run only in embedded mode.  Please review


> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, jira_2283_.diff.txt, jira_2283_stat.txt, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Commented: (DERBY-2283) convert lang/currentof.java test to junit test

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477456 ] 

Daniel John Debrunner commented on DERBY-2283:
----------------------------------------------

I was going to add a test case for a change in the cursor statement to this test but then I realized that the fixture testbug4395(0 was doing exactly that though its name did not indicate that and its javadoc comments did not describe what it is testing. I cleaned it up with revision 513967.

Looking in detail at the test I see that even though it is testing UPDATE and DELETE WHERE CURRENT OF it only checks that the update counts are correct after an execution, not that the right values were updated or the right row deleted. I think this is because the old test would have tested the output be comparing it to the master file, something to watch out for when converting tests.

Also the testUpdate() has a whole set of tests that are testing if a read only statement results in a null cursor name. These tests are not specific to UPDATE so ideally would be in their own fixture.

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, jira_2283_.diff.txt, jira_2283_02_08_diff.txt, jira_2283_02_08_stat.txt, jira_2283_stat.txt, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Updated: (DERBY-2283) convert lang/currentof.java test to junit test

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

Manjula Kutty updated DERBY-2283:
---------------------------------

    Attachment: svn_stat_02_02.txt
                svn_diff_02_02.txt

I changed the test to include Dan's comments. I'm attaching the diff and stat files. Please review it and let me know if you have any comments/questions/suggestions


> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Closed: (DERBY-2283) convert lang/currentof.java test to junit test

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

Manjula Kutty closed DERBY-2283.
--------------------------------


> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, DERBY-2283_diff_03_16.txt, DERBY-2283_stat_03_16.txt, jira_2283_.diff.txt, jira_2283_02_08_diff.txt, jira_2283_02_08_stat.txt, jira_2283_stat.txt, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Commented: (DERBY-2283) convert lang/currentof.java test to junit test

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

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

Manjula, I just have one comment. Should the setUp() method be calling it's super's implementation (ie super.setUp) like the tearDown() method?

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Commented: (DERBY-2283) convert lang/currentof.java test to junit test

Posted by "Andrew McIntyre (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471562 ] 

Andrew McIntyre commented on DERBY-2283:
----------------------------------------

Committed jira_2283_02_08_diff.txt with revision 505131.

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, jira_2283_.diff.txt, jira_2283_02_08_diff.txt, jira_2283_02_08_stat.txt, jira_2283_stat.txt, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Commented: (DERBY-2283) convert lang/currentof.java test to junit test

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469623 ] 

Daniel John Debrunner commented on DERBY-2283:
----------------------------------------------

The test generally looks good, usually the timeout failures are due to another test not closing its JDBC objects, such as statements. So it might be due to your test, I think at least one prepared statement is not closed.

Some minor improvements that would make the test even more readable for others:

Instead of:
   assertEquals(cursor.getCursorName(), null);
use
   assertNull(cursor.getCursorName());
Also the pattern for assert methods is the expected value is the left argument , and the tested value the right, the use with null above has it the other way around, just an FYI.

Similar for:
   assertEquals(false, cursor.next());
use
   assertFalse(cursor.next());

You can look at the JUnit javadoc for the Assert class to see the range of assert methods available.

I think many of the try-catch blocks in the test can be replaced with the assert methods Army added a while ago:
e.g.
		try {
			delete.executeUpdate(); // no current row / closed
			fail("Exception expected above!");
		} catch (SQLException se) {
			assertSQLState("24000", se);
		}

with
       // no current row / closed
       assertStatementError("24000", delete);

This helps to give the code a cleaner look.

That would also cleanup these try-catch blocks:
		try {
			assertUpdateCount(update, 0);
			fail("Exception expected above!");

		} catch (SQLException se) {
			assertSQLState("XCL07", se);
		}

Here I think the assertUpdateCount() confuses the reader as you don't expect that update statement to succeed an return zero rows, but the assertUpdateCount implies that. If for some reason the assertStatementError() didn't work here, I think clearer code would be:
		try {
			update.executeUpdate();
			fail("Exception expected above!");

		} catch (SQLException se) {
			assertSQLState("XCL07", se);
		}
but this is just an FYI, since the assertStatementError is the correct approach.

Can you provide a patch using svn diff instead of individual files? Also are you going to remove the old test and its master files etc?



> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Closed: (DERBY-2283) convert lang/currentof.java test to junit test

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

Manjula Kutty closed DERBY-2283.
--------------------------------

    Resolution: Fixed

Closing this issue 

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, jira_2283_.diff.txt, jira_2283_02_08_diff.txt, jira_2283_02_08_stat.txt, jira_2283_stat.txt, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Updated: (DERBY-2283) convert lang/currentof.java test junit

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

Manjula Kutty updated DERBY-2283:
---------------------------------

    Derby Info: [Patch Available]

> convert lang/currentof.java test junit
> --------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java
>
>
> Using this Jira entry to attach the converted test in future

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


[jira] Updated: (DERBY-2283) convert lang/currentof.java test to junit test

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

Manjula Kutty updated DERBY-2283:
---------------------------------

    Derby Info: [Patch Available]

> convert lang/currentof.java test to junit test
> ----------------------------------------------
>
>                 Key: DERBY-2283
>                 URL: https://issues.apache.org/jira/browse/DERBY-2283
>             Project: Derby
>          Issue Type: Test
>            Reporter: Manjula Kutty
>         Assigned To: Manjula Kutty
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: _Suite.java, CurrentOfTest.java, DERBY-2283_diff_03_16.txt, DERBY-2283_stat_03_16.txt, jira_2283_.diff.txt, jira_2283_02_08_diff.txt, jira_2283_02_08_stat.txt, jira_2283_stat.txt, svn_diff_02_02.txt, svn_stat_02_02.txt
>
>
> Using this Jira entry to attach the converted test in future

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