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 "Myrna van Lunteren (JIRA)" <ji...@apache.org> on 2008/08/01 01:18:31 UTC

[jira] Commented: (DERBY-3801) Convert "org.apache.derbyTesting.functionTests.tests.lang.holdCursorIJ.sql" to junit.

    [ https://issues.apache.org/jira/browse/DERBY-3801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618901#action_12618901 ] 

Myrna van Lunteren commented on DERBY-3801:
-------------------------------------------

I looked a little at this, and what you're seeing is actually expected behavior difference between DerbyNetClient and embedded. DerbyNetClient passes; embedded fails. And indeed, if I modify your suite method to do this: 
  ...
          return TestConfiguration.clientServerSuite(        
          //return TestConfiguration.defaultSuite(
		HoldCursorIJTest.class);
    }
the test passes. If I use TestConfiguration.embeddedSuite(HoldCursorIJTest.class) we 2 passes, and 1 failure: the error you saw - for the embedded run.

There are 2 (actually 3, but let's ignore the DerbyNet one for the purpose of this discussion) canons (variations of a master file):
- ...functionTests/master/HoldCursorIJ.out 
- ...functionTests/master/DerbyNetClient/HoldCursorIJ.out

If you diff the two original masters you'll see that in the affected area, embedded gives error X0X95 and DerbyNetClient gives 42Y55.
There are comments in the .sql (and thus in the .out files) that explain some of the difference in behavior; in derbyNetClient, the cursor (on the server) is already closed, and thus, the table gets dropped earlier.
I wasn't familiar with this difference, so I looked up in the svn browser (starting at the top of trunk: http://svn.apache.org/viewvc/db/derby/)  where these comments were added and found this change: http://svn.apache.org/viewvc?view=rev&revision=377367.
This refers to https://issues.apache.org/jira/browse/DERBY-821, and there we can see Knut Anders' explanation for this difference.

All that said, I have some misgivings on how you're approaching this conversion.
There is already a hold-cursor junit test (...functionTests/tests/lang/holdCursorTest, from original holdCursorJava.
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. Examples of how this can be done are:
...functionTests/tests/tools/ijRunScriptTest
...functionTests/tests/tools/ToolScripts
...functionTests/tests/nist/NistScripts
...functionTests/tests/derbynet/NetIjTest
You'd have to find a way to make a separate comparison between  NetworkServer/DerbyNetClient vs. Embedded. Maybe the easiest is to have two tests...

Myrna

> 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: Test
>            Reporter: Junjie Peng
>            Assignee: Junjie Peng
>         Attachments: derby-3801-1-patch.txt
>
>
> 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.