[
https://issues.apache.org/jira/browse/DERBY-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ramandeep Kaur updated DERBY-2517:
----------------------------------
Attachment: DERBY-2517.diff
I am attaching patch for conversion of forupdate.sql to junit test
"ForUpdateTest.java".
I am having one problem during conversion.
In method "public void testUpdates2()" in ForUpdateTest.java file, whenever, I
uncomment line stmt3.executeUpdate("delete from t1 where current of C4");, I
get the following error.
.......E..........E...
Time: 38.224
There were 2 errors:
1)
testUpdates2(org.apache.derbyTesting.functionTests.tests.lang.ForUpdateTest)java.sql.SQLException:
Cursor 'C4' not found. Verify that autocommit is OFF.
at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source)
at
org.apache.derby.impl.sql.compile.CurrentOfNode.bindNonVTITables(Unknown Source)
at org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown Source)
at
org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown Source)
at
org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown Source)
at org.apache.derby.impl.sql.compile.DeleteNode.bindStatement(Unknown
Source)
at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown
Source)
at
org.apache.derbyTesting.functionTests.tests.lang.ForUpdateTest.testUpdates2(ForUpdateTest.java:232)
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:88)
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)
2)
testUpdates2(org.apache.derbyTesting.functionTests.tests.lang.ForUpdateTest)java.sql.SQLException:
Invalid cursor name 'C4'.
at
org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
at org.apache.derby.client.am.SqlException.getSQLException(Unknown
Source)
at org.apache.derby.client.am.Statement.executeUpdate(Unknown Source)
at
org.apache.derbyTesting.functionTests.tests.lang.ForUpdateTest.testUpdates2(ForUpdateTest.java:232)
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:88)
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 junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
at junit.extensions.TestSetup.run(TestSetup.java:23)
Caused by: org.apache.derby.client.am.SqlException: Invalid cursor name 'C4'.
at org.apache.derby.client.am.Statement.flowExecute(Unknown Source)
at org.apache.derby.client.am.Statement.executeUpdateX(Unknown Source)
... 34 more
FAILURES!!!
Tests run: 20, Failures: 0, Errors: 2
> convert lang/forupdate.sql to junit
> ------------------------------------
>
> Key: DERBY-2517
> URL: https://issues.apache.org/jira/browse/DERBY-2517
> Project: Derby
> Issue Type: Test
> Components: Test
> Reporter: Ramandeep Kaur
> Assigned To: Ramandeep Kaur
> Priority: Minor
> Fix For: 10.3.0.0
>
> Attachments: DERBY-2517.diff
>
>
> convert lang/forupdate.sql to junit
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.