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 "Junjie Peng (JIRA)" <ji...@apache.org> on 2008/08/03 15:59:44 UTC

[jira] Updated: (DERBY-3802) Convert "org.apache.derbyTesting.functionTests.tests.lang.optimizerOverrides.sql" to junit.

     [ https://issues.apache.org/jira/browse/DERBY-3802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Junjie Peng updated DERBY-3802:
-------------------------------

    Attachment: derby-3802-1.patch

As for derby-3802-1.patch, something important and ask for help:
1. testFragmentsAsComments() has failed. Exception statck is:
1) testFragmentsAsComments(org.apache.derbyTesting.functionTests.tests.lang.Opti
mizerOverridingTest)java.sql.SQLException: Lexical error at line 1, column 17.
Encountered: <EOF> after : ""。
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknow
n Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source
)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException
(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Un
known Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown So
urce)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown So
urce)
        at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(Unknown Source
)
        at org.apache.derbyTesting.functionTests.tests.lang.OptimizerOverridingT
est.testFragmentsAsComments(OptimizerOverridingTest.java:221)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:
104)
        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: ERROR 42X02: Lexical error at line 1, column 17.  Encountered: <EOF>
after : ""。
        at org.apache.derby.iapi.error.StandardException.newException(Unknown So
urce)
        at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown S
ource)
        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.prepa
reInternalStatement(Unknown Source)
        ... 26 more

How to code to "Make sure following fragments get treated as comments"?

2. testPropertyForUpdate() is for Line 109-Line 145 in OptimizerOverriding.sql.  But, some  test cases including "for update of c2, c1" is ignored as I don't know how to realize them in the form of statement sentences.

3. In method testSpell(), two test cases are added to test more widely. They are (Line 365- Line 369):
 //A test is added. It shows,
        //"--DeRbY-pRoPeRtIeSAAAA index = t1_c1" is 
        //treated as "--DeRbY-pRoPeRtIeS AAAA index = t1_c1"
        assertStatementError("42Y44", st, "select * from t1 " +
        	" --DeRbY-pRoPeRtIeSAAAA index = t1_c1");
and (Line 377 - Line 380)
        //A test is added. If the property spelled wrong gets treated 
        //as an optimizer override, the following test will fail.
        assertStatementError("42Y46", st, "select * from t1 " +
               	" --DeRbY-pRoPeRtIeS index = t1_notexisting");
Please check them!

Thank you!
Junjie

> Convert "org.apache.derbyTesting.functionTests.tests.lang.optimizerOverrides.sql" to junit. 
> --------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3802
>                 URL: https://issues.apache.org/jira/browse/DERBY-3802
>             Project: Derby
>          Issue Type: Test
>            Reporter: Junjie Peng
>            Assignee: Junjie Peng
>             Fix For: 10.1.3.2
>
>         Attachments: derby-3802-1.patch
>
>


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