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 "Ramin Moazeni (JIRA)" <ji...@apache.org> on 2007/06/21 19:34:25 UTC

[jira] Created: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

Convert jdbc4/TestResultSetMethods.java to JUnit
------------------------------------------------

                 Key: DERBY-2854
                 URL: https://issues.apache.org/jira/browse/DERBY-2854
             Project: Derby
          Issue Type: Bug
    Affects Versions: 10.3.0.0
            Reporter: Ramin Moazeni
            Assignee: Ramin Moazeni




-- 
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-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

Posted by Ramin Moazeni <rm...@gmail.com>.
Hi Dan

Thanks for your review feedback. I changed the test
to use utility methods in creating statement objects. However,
there are cases where there is no utility method provided for
createStatement, prepareCall, etc
(e.g ceateStatement (int resultSetType, int resultSetConcurrency, int
resultSetHoldability) )

To resolve this issue, I can go ahead an add these methods to
BaseJDBCTestCase.java...any thought?

Please advise...

Thanks,
Ramin

On 7/6/07, Daniel John Debrunner (JIRA) <ji...@apache.org> wrote:
>
>     [ https://issues.apache.org/jira/browse/DERBY-2854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510748 ]
>
> Daniel John Debrunner commented on DERBY-2854:
> ----------------------------------------------
>
> The test could use the utility methods in most test fixtures to create statement objects.
>
> Replace
>
>  Statement s = conn.createStatement();
>
> with
>
>   Statement s = createStatement();
>
> e.g. in testGetHoldability().
>
> These objects will very soon be automatically closed at tearDown and make the test more readable.
>
> > Convert jdbc4/TestResultSetMethods.java to JUnit
> > ------------------------------------------------
> >
> >                 Key: DERBY-2854
> >                 URL: https://issues.apache.org/jira/browse/DERBY-2854
> >             Project: Derby
> >          Issue Type: Task
> >    Affects Versions: 10.3.0.0
> >            Reporter: Ramin Moazeni
> >            Assignee: Ramin Moazeni
> >         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat, DERBY-2854v1.diff, DERBY-2854v1.stat
> >
> >
>
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

[jira] Updated: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

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

Ramin Moazeni updated DERBY-2854:
---------------------------------

    Attachment: DERBY-2854v3.stat
                DERBY-2854v3.diff

Thanks Kathey for your comment.
I am attaching another patch that resolves the problem
with the earlier patch.

I appreciate your review.

Thanks
Ramin

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Task
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat, DERBY-2854v1.diff, DERBY-2854v1.stat, DERBY-2854v2.diff, DERBY-2854v2.stat, DERBY-2854v3.diff, DERBY-2854v3.stat
>
>


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


[jira] Resolved: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

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

Myrna van Lunteren resolved DERBY-2854.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.4.0.0

This was committed with revision 574053 - which I assume resolves this issue.

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Task
>          Components: Test
>    Affects Versions: 10.3.1.4
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>             Fix For: 10.4.0.0
>
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat, DERBY-2854v1.diff, DERBY-2854v1.stat, DERBY-2854v2.diff, DERBY-2854v2.stat, DERBY-2854v3.diff, DERBY-2854v3.stat, DERBY-2854v4.diff, DERBY-2854v4.stat
>
>


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


[jira] Updated: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

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

Mike Matrigali updated DERBY-2854:
----------------------------------

    Component/s: Test

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Task
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat, DERBY-2854v1.diff, DERBY-2854v1.stat, DERBY-2854v2.diff, DERBY-2854v2.stat, DERBY-2854v3.diff, DERBY-2854v3.stat
>
>


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


[jira] Updated: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

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

Daniel John Debrunner updated DERBY-2854:
-----------------------------------------

    Issue Type: Task  (was: Bug)

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Task
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat
>
>


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


[jira] Commented: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

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

Kathey Marsden commented on DERBY-2854:
---------------------------------------

Hi Ramin,

I am having trouble applying the patch, could you synch up, test and recreate the patch?

Thanks

Kathey


> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Task
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat, DERBY-2854v1.diff, DERBY-2854v1.stat, DERBY-2854v2.diff, DERBY-2854v2.stat, DERBY-2854v3.diff, DERBY-2854v3.stat
>
>


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


[jira] Updated: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

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

Ramin Moazeni updated DERBY-2854:
---------------------------------

    Attachment: DERBY-2854v1.stat
                DERBY-2854v1.diff

Thanks Knut for your review. I am hoping that I have addressed
all your comments in this new patch.

Your review and comments are appreciated.

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Task
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat, DERBY-2854v1.diff, DERBY-2854v1.stat
>
>


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


[jira] Updated: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

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

Ramin Moazeni updated DERBY-2854:
---------------------------------

    Attachment: DERBY-2854v0.stat
                DERBY-2854v0.diff

Attachment please find the patch that converts this issue to JUnit.
You feedback and review is appreciated.

Please note that derbyall and suites.All tests are finished without
any errors.

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat
>
>


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


[jira] Updated: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

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

Kathey Marsden updated DERBY-2854:
----------------------------------

    Derby Info:   (was: [Patch Available])

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Task
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat, DERBY-2854v1.diff, DERBY-2854v1.stat, DERBY-2854v2.diff, DERBY-2854v2.stat
>
>


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


[jira] Commented: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

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

Kathey Marsden commented on DERBY-2854:
---------------------------------------

I have not looked at the code yet, but trying to run the test I get:
[C:/test] .tests.jdbc4.ResultSetTest 
.........................................
.....E.E...................................
.............E.E..
Time: 4.703
There were 4 errors:
1) testGetHoldability(org.apache.derbyTesting.functionTests.tests.jdbc4.ResultSetTest)java.sql.SQLSyntaxErrorException:
The class 'org.apache.derbyTesting.functionTests.tests.jdbc4.ResultSetMethodsTest' does not exist or is inaccessible. Th
is can happen if the class is not public.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:91)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
        at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java:224)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:398)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(EmbedPreparedStatement.java:144)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement.<init>(EmbedCallableStatement.java:68)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement20.<init>(EmbedCallableStatement20.java:85)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement30.<init>(EmbedCallableStatement30.java:61)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement40.<init>(EmbedCallableStatement40.java:44)
        at org.apache.derby.jdbc.Driver40.newEmbedCallableStatement(Driver40.java:124)
        at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(EmbedConnection.java:1014)
        at org.apache.derbyTesting.junit.BaseJDBCTestCase.prepareCall(BaseJDBCTestCase.java:306)
        at org.apache.derbyTesting.functionTests.tests.jdbc4.ResultSetTest.testGetHoldability(ResultSetTest.java:1517)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
Caused by: java.sql.SQLException: The class 'org.apache.derbyTesting.functionTests.tests.jdbc4.ResultSetMethodsTest' doe
s not exist or is inaccessible. This can happen if the class is not public.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:13
5)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
        ... 40 more
Caused by: java.sql.SQLException: Java exception: 'org.apache.derbyTesting.functionTests.tests.jdbc4.ResultSetMethodsTes
t: java.lang.ClassNotFoundException'.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:13
5)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:88)
        at org.apache.derby.impl.jdbc.Util.javaException(Util.java:245)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:403)
        ... 38 more
Caused by: java.lang.ClassNotFoundException: org.apache.derbyTesting.functionTests.tests.jdbc4.ResultSetMethodsTest
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at org.apache.derby.impl.services.reflect.ReflectClassesJava2.loadClassNotInDatabaseJar(ReflectClassesJava2.java
:108)
        at org.apache.derby.impl.services.reflect.DatabaseClasses.loadApplicationClass(DatabaseClasses.java:232)
        at org.apache.derby.iapi.services.loader.ClassInspector.getClass(ClassInspector.java:852)
        at org.apache.derby.iapi.services.loader.ClassInspector.accessible(ClassInspector.java:130)
        at org.apache.derby.impl.sql.compile.QueryTreeNode.verifyClassExist(QueryTreeNode.java:1481)
        at org.apache.derby.impl.sql.compile.StaticMethodCallNode.bindExpression(StaticMethodCallNode.java:248)
        at org.apache.derby.impl.sql.compile.JavaToSQLValueNode.bindExpression(JavaToSQLValueNode.java:245)
        at org.apache.derby.impl.sql.compile.CallStatementNode.bindStatement(CallStatementNode.java:145)
        at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:314)
        at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:88)
        at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConne
ctionContext.java:753)
        at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(EmbedPreparedStatement.java:129)
        ... 33 more
2) testIsClosed(org.apache.derbyTesting.functionTests.tests.jdbc4.ResultSetTest)java.sql.SQLException: PROCEDURE 'RETRIE
VE_RESULT_SETS' already exists.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:95)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:202)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:391)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:346)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:1572)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:81)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1293)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:596)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:528)
        at org.apache.derbyTesting.functionTests.tests.jdbc4.ResultSetTest.testIsClosed(ResultSetTest.java:1578)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
Caused by: java.sql.SQLException: PROCEDURE 'RETRIEVE_RESULT_SETS' already exists.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:13
5)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
        ... 34 more
Caused by: ERROR X0Y68: PROCEDURE 'RETRIEVE_RESULT_SETS' already exists.
        at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:301)
        at org.apache.derby.impl.sql.execute.CreateAliasConstantAction.executeConstantAction(CreateAliasConstantAction.j
ava:237)
        at org.apache.derby.impl.sql.execute.MiscResultSet.open(MiscResultSet.java:64)
        at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:370)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1203)
        ... 28 more
3) testGetHoldability(org.apache.derbyTesting.functionTests.tests.jdbc4.ResultSetTest)java.sql.SQLSyntaxErrorException:
The class 'org.apache.derbyTesting.functionTests.tests.jdbc4.ResultSetMethodsTest' does not exist or is inaccessible. Th
is can happen if the class is not public.
        at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:83)
        at org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:362)
        at org.apache.derby.client.am.Connection.prepareCall(Connection.java:1678)
        at org.apache.derbyTesting.junit.BaseJDBCTestCase.prepareCall(BaseJDBCTestCase.java:306)
        at org.apache.derbyTesting.functionTests.tests.jdbc4.ResultSetTest.testGetHoldability(ResultSetTest.java:1517)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
Caused by: org.apache.derby.client.am.SqlException: The class 'org.apache.derbyTesting.functionTests.tests.jdbc4.ResultS
etMethodsTest' does not exist or is inaccessible. This can happen if the class is not public.
        at org.apache.derby.client.am.Statement.completeSqlca(Statement.java:1713)
        at org.apache.derby.client.net.NetStatementReply.parsePrepareError(NetStatementReply.java:541)
        at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(NetStatementReply.java:143)
        at org.apache.derby.client.net.NetStatementReply.readPrepare(NetStatementReply.java:76)
        at org.apache.derby.client.net.StatementReply.readPrepare(StatementReply.java:60)
        at org.apache.derby.client.net.NetStatement.readPrepare_(NetStatement.java:184)
        at org.apache.derby.client.am.Statement.readPrepare(Statement.java:1359)
        at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInput(PreparedStatement.java:1887)
        at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(PreparedStatement.java:1947)
        at org.apache.derby.client.am.PreparedStatement.prepare(PreparedStatement.java:309)
        at org.apache.derby.client.am.Connection.prepareCallX(Connection.java:1690)
        at org.apache.derby.client.am.Connection.prepareCall(Connection.java:1670)
        ... 36 more
Caused by: org.apache.derby.client.am.SqlException: Java exception: 'org.apache.derbyTesting.functionTests.tests.jdbc4.R
esultSetMethodsTest: java.lang.ClassNotFoundException'.
        ... 48 more
4) testIsClosed(org.apache.derbyTesting.functionTests.tests.jdbc4.ResultSetTest)java.sql.SQLException: PROCEDURE 'RETRIE
VE_RESULT_SETS' already exists.
        at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:95)
        at org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:362)
        at org.apache.derby.client.am.Statement.execute(Statement.java:824)
        at org.apache.derbyTesting.functionTests.tests.jdbc4.ResultSetTest.testIsClosed(ResultSetTest.java:1578)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:95)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
        at junit.extensions.TestSetup.run(TestSetup.java:23)
        at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
Caused by: org.apache.derby.client.am.SqlException: PROCEDURE 'RETRIEVE_RESULT_SETS' already exists.
        at org.apache.derby.client.am.Statement.completeSqlca(Statement.java:1713)
        at org.apache.derby.client.am.Statement.completeExecuteImmediate(Statement.java:1322)
        at org.apache.derby.client.net.NetStatementReply.parseEXCSQLIMMreply(NetStatementReply.java:207)
        at org.apache.derby.client.net.NetStatementReply.readExecuteImmediate(NetStatementReply.java:58)
        at org.apache.derby.client.net.StatementReply.readExecuteImmediate(StatementReply.java:45)
        at org.apache.derby.client.net.NetStatement.readExecuteImmediate_(NetStatement.java:125)
        at org.apache.derby.client.am.Statement.readExecuteImmediate(Statement.java:1318)
        at org.apache.derby.client.am.Statement.flowExecute(Statement.java:2014)
        at org.apache.derby.client.am.Statement.executeX(Statement.java:829)
        at org.apache.derby.client.am.Statement.execute(Statement.java:815)
        ... 35 more


> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Task
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat, DERBY-2854v1.diff, DERBY-2854v1.stat, DERBY-2854v2.diff, DERBY-2854v2.stat
>
>


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


[jira] Commented: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

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

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

The test could use the utility methods in most test fixtures to create statement objects.

Replace

 Statement s = conn.createStatement();

with

  Statement s = createStatement();

e.g. in testGetHoldability().

These objects will very soon be automatically closed at tearDown and make the test more readable.

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Task
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat, DERBY-2854v1.diff, DERBY-2854v1.stat
>
>


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


[jira] Commented: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

Posted by "Øystein Grøvlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510158 ] 

Øystein Grøvlen commented on DERBY-2854:
----------------------------------------

Note that there is also an existing junit test jdbc4/ResultSetTest.
I think it is a bit confusing to have two different tests with so similar names.
How should I know which one to use when adding another test case?
Has it been checked whether these two tests have overlapping test cases?

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat
>
>


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


[jira] Commented: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510155 ] 

Knut Anders Hatlen commented on DERBY-2854:
-------------------------------------------

Some general comments:

  1) The argument order is wrong for the calls to assertEquals(). The expected value should come before the actual value.
  2) The baseSuite() method could be removed, and suite() could be implemented as a simple call to TestConfiguration.defaultSuite(ResultSetMethodsTest.class).
  3) There's no need for the savedAutoCommit field since each fixture gets a new connection.
  4) Catching exceptions just to call fail() should be avoided as it will swallow the stack trace. The exception should rather be propagated up the call stack and handled by the JUnit framework.
  5) assertEquals(...true...) and assertEquals(...false...) should be replaced with assertTrue() and assertFalse().
  6) When assertSQLState() is called, there is no need to call assertNotNull(sqle.getSQLState()).

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat
>
>


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


[jira] Commented: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

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

Ramin Moazeni commented on DERBY-2854:
--------------------------------------

Hi Oystein,

I looked at jdbc4/ResultSetTest and it looks like a different test.
How about changing jdbc4/ResultSetMethodsTest.java to 
jdbc4/HoldabilityTest.java?

Thanks
Ramin

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Task
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat, DERBY-2854v1.diff, DERBY-2854v1.stat
>
>


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


[jira] Commented: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510147 ] 

Knut Anders Hatlen commented on DERBY-2854:
-------------------------------------------

I'm not able to build Derby with the patch.

compile_jdbc4:
    [javac] Compiling 28 source files to /export/home/kh160127/derby/trunk/classes
    [javac] /export/home/kh160127/derby/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/_Suite.java:70: cannot find symbol
    [javac] symbol  : variable TestResultSetMethods
    [javac] location: class org.apache.derbyTesting.functionTests.tests.jdbc4._Suite
    [javac]             suite.addTest(TestResultSetMethods.suite());
    [javac]                           ^
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 error

BUILD FAILED

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat
>
>


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


[jira] Updated: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

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

Ramin Moazeni updated DERBY-2854:
---------------------------------

    Derby Info: [Patch Available]

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat
>
>


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


[jira] Updated: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

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

Ramin Moazeni updated DERBY-2854:
---------------------------------

    Attachment: DERBY-2854v4.stat
                DERBY-2854v4.diff

Thank you Kathey. I recreated a new patch and tested it.
I appreciate your review.

Thanks
Ramin

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Task
>          Components: Test
>    Affects Versions: 10.3.1.4
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat, DERBY-2854v1.diff, DERBY-2854v1.stat, DERBY-2854v2.diff, DERBY-2854v2.stat, DERBY-2854v3.diff, DERBY-2854v3.stat, DERBY-2854v4.diff, DERBY-2854v4.stat
>
>


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


[jira] Commented: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

Posted by "Øystein Grøvlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12511082 ] 

Øystein Grøvlen commented on DERBY-2854:
----------------------------------------

I am not sure what you mean by "looks like a different test".  Any reason the two tests can not be merged?

Renaming jdbc4/ResultSetMethodsTest.java to jdbc4/HoldabilityTest.java does not seem like a good idea since the holdability test case is just one of several test cases in this test.

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Task
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat, DERBY-2854v1.diff, DERBY-2854v1.stat
>
>


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


[jira] Updated: (DERBY-2854) Convert jdbc4/TestResultSetMethods.java to JUnit

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

Ramin Moazeni updated DERBY-2854:
---------------------------------

    Attachment: DERBY-2854v2.stat
                DERBY-2854v2.diff

Thanks Dan for your review...I am attaching another patch which
I think addresses your comments. Please review....

I looked at both ResultSetTest.java and ResultSetMethodsTest.java
and they both seems to test JDBC4 methods in ResultsSet interface.
So, I merged the two tests into ResultsSetTest.java.

Please note that I added some utility methods to BaseJDBCTestCase.java:
public Statement createStatement(int resultSetType,int resultSetConcurrency,int resultSetHoldability)
public CallableStatement prepareCall(String sql, int resultSetType,int resultSetConcurrency,int resultSetHoldability)
public CallableStatement prepareCall(String sql,int resultSetType,int resultSetConcurrency) 

Thanks
Ramin

> Convert jdbc4/TestResultSetMethods.java to JUnit
> ------------------------------------------------
>
>                 Key: DERBY-2854
>                 URL: https://issues.apache.org/jira/browse/DERBY-2854
>             Project: Derby
>          Issue Type: Task
>    Affects Versions: 10.3.0.0
>            Reporter: Ramin Moazeni
>            Assignee: Ramin Moazeni
>         Attachments: DERBY-2854v0.diff, DERBY-2854v0.stat, DERBY-2854v1.diff, DERBY-2854v1.stat, DERBY-2854v2.diff, DERBY-2854v2.stat
>
>


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