[
https://issues.apache.org/jira/browse/DERBY-3801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881135#action_12881135
]
Yun Lee commented on DERBY-3801:
--------------------------------
I have looked into this issue for some days, and done some converting in pure
JUnit form. Eventually, I agreed with the first comment given by Myrna:
"Because there's such a clear reference to IJ I think the purpose of this test
was to do some testing of the hold cursor functionality in ij. So, I'd suggest
converting this test using the ScriptTest mechanism", especially with Language
clauses as "get cursor with hold", "next", "update where current of".
Furthur, in my work, I've found, pure JUnit form will mask some details, for
example, the detailed prompt for XCL16 in embeded mode is different from the
one in ClientServer mode. The difference will be discarded in pure JUnit form,
while clear in ScriptTest mechanism.
I have attached derby-3801-4.patch, in which I have added HoldCursorIJTest
extending ScriptTest to do tests on both mode of Derby.
However, there's something wrong with subclasses of ScriptTest in my testing
environment. When running HoldCursorIJTest, each of the tests fails because of
a lot of messy codes '?'.
D:\derby\test>java junit.textui.TestRunner org.apache.derbyTesting.functionTests
.tests.lang.HoldCursorIJTest
.F.F
Time: 5.406
There were 2 failures:
1) holdCursorIJ(org.apache.derbyTesting.functionTests.tests.lang.HoldCursorIJTes
t)junit.framework.ComparisonFailure: Output at line 19 expected:<[0 rows inserte
d/updated/deleted]> but was:<[????????? 0 ?]>
at org.apache.derbyTesting.functionTests.util.CanonTestCase.compareCanon
(CanonTestCase.java:106)
at org.apache.derbyTesting.functionTests.util.ScriptTestCase.runTest(Scr
iptTestCase.java:198)
at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:
109)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
)
2) holdCursorIJ(org.apache.derbyTesting.functionTests.tests.lang.HoldCursorIJTes
t)junit.framework.ComparisonFailure: Output at line 19 expected:<[0 rows inserte
d/updated/deleted]> but was:<[????????? 0 ?]>
at org.apache.derbyTesting.functionTests.util.CanonTestCase.compareCanon
(CanonTestCase.java:106)
at org.apache.derbyTesting.functionTests.util.ScriptTestCase.runTest(Scr
iptTestCase.java:198)
at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:
109)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57
)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
FAILURES!!!
Tests run: 2, Failures: 2, Errors: 0
D:\derby\test>
The similiar problem exists in other subclasses of ScriptTestCase, such as
NistScripts,ToolScripts.
Is this caused by the setting of Character encoding? How to resolve this
problem?
Thanks!
> Convert "org.apache.derbyTesting.functionTests.tests.lang.holdCursorIJ.sql"
> to junit.
> --------------------------------------------------------------------------------------
>
> Key: DERBY-3801
> URL: https://issues.apache.org/jira/browse/DERBY-3801
> Project: Derby
> Issue Type: Improvement
> Components: Test
> Reporter: Junjie Peng
> Assignee: Yun Lee
> Attachments: derby-3801-1-patch.txt, derby-3801-2.patch,
> derby-3801-2.stat, DERBY-3801-Tiago.patch
>
>
> Convert "org.apache.derbyTesting.functionTests.tests.lang.holdCursorIJ.sql"
> to junit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.