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/11/13 10:08:53 UTC
[jira] Created: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Convert jdbcapi/statementJdbc20.java to JUnit
---------------------------------------------
Key: DERBY-3203
URL: https://issues.apache.org/jira/browse/DERBY-3203
Project: Derby
Issue Type: Test
Reporter: Ramin Moazeni
Assignee: Ramin Moazeni
Fix For: 10.4.0.0
This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
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-3203) Convert jdbcapi/statementJdbc20.java to JUnit
Posted by Myrna van Lunteren <m....@gmail.com>.
On 3/26/08, Dyre Tjeldvoll (JIRA) <ji...@apache.org> wrote:
>
> [ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582200#action_12582200 ]
>
> Dyre Tjeldvoll commented on DERBY-3203:
> ---------------------------------------
>
> Can this issue be resloved/closed now?
>
> > Convert jdbcapi/statementJdbc20.java to JUnit
It seems this is all done; however, I wonder if you logged a JIRA
issue for the bug you noticed (see the comment on Dec 07)? I did a
quick search but didn't find one.
Myrna
[jira] Updated: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Ramin Moazeni (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ramin Moazeni updated DERBY-3203:
---------------------------------
Attachment: (was: DERBY-3203v0.diff)
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.stat
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Ramin Moazeni (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ramin Moazeni updated DERBY-3203:
---------------------------------
Derby Info: [Patch Available]
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dyre Tjeldvoll updated DERBY-3203:
----------------------------------
Attachment: DERBY-3203v3.diff
Hi Ramin,
I think Dan is making a very good point about the missing fail()
asserts in some of the try-blocks.
I've attached a patch (v3) which adds the missing fail()-asserts.
Unfortunately, it also reveals that one of the test
cases is not throwing the expected exception :(
The statement that doesn't fail is 'rs.setFetchSize(100)' in
'testLocalValuesOfResultSet()' in client mode. In v3 I have
enclosed the fail()-assert in an usingEmbedded()-test just to
make the test pass, but I don't know if this is expected
behavior or a bug. What do you think?
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat, DERBY-3203v2.diff, DERBY-3203v3.diff
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Ramin Moazeni (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ramin Moazeni updated DERBY-3203:
---------------------------------
Attachment: DERBY-3203v0.stat
DERBY-3203v0.diff
Hello
I am attaching the patch to this issue.
I appreciate your review/comments.
Thanks
Ramin
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dyre Tjeldvoll updated DERBY-3203:
----------------------------------
Derby Info: (was: [Patch Available])
Committed revision 601058.
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat, DERBY-3203v2.diff
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kathey Marsden updated DERBY-3203:
----------------------------------
Component/s: Test
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Components: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat, DERBY-3203v2.diff, DERBY-3203v3.diff
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544006 ]
Kathey Marsden commented on DERBY-3203:
---------------------------------------
Hi Ramin, I realize this is probably just carry over from the previous test, but I wonder if it makes more sense to use ResultSet.FETCH_REVERSE instead of 1001.
assertEquals(stmt.getFetchDirection(), 1001);
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (DERBY-3203) Convert jdbcapi/statementJdbc20.java to
JUnit
Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dyre Tjeldvoll closed DERBY-3203.
---------------------------------
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Components: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat, DERBY-3203v2.diff, DERBY-3203v3.diff
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564118#action_12564118 ]
Bryan Pendleton commented on DERBY-3203:
----------------------------------------
Committed the two deletes to the trunk as revision 616834.
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Components: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat, DERBY-3203v2.diff, DERBY-3203v3.diff
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549354 ]
Dyre Tjeldvoll commented on DERBY-3203:
---------------------------------------
I briefly checked what the javadoc and the JDBC tutorial says about ResultSet.setFetchSize(), and I cannot see anything which suggests that rs.setFetchSize(100) is illegal in this context, and the error message "XJ062.S=Invalid parameter value ''{0}'' for ResultSet.setFetchSize(int rows)." doesn't provide any clues either. So does anyone know why this fails in embedded mode?
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat, DERBY-3203v2.diff, DERBY-3203v3.diff
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Ramin Moazeni (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ramin Moazeni updated DERBY-3203:
---------------------------------
Attachment: DERBY-3203v0.diff
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dyre Tjeldvoll resolved DERBY-3203.
-----------------------------------
Resolution: Fixed
Resolving since the problem with ResultSet.setFetchSize() has been factored out in a separate issue (DERBY-3573)
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Components: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat, DERBY-3203v2.diff, DERBY-3203v3.diff
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582200#action_12582200 ]
Dyre Tjeldvoll commented on DERBY-3203:
---------------------------------------
Can this issue be resloved/closed now?
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Components: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat, DERBY-3203v2.diff, DERBY-3203v3.diff
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Ramin Moazeni (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ramin Moazeni updated DERBY-3203:
---------------------------------
Attachment: DERBY-3203v2.diff
Hi Kathey
Thanks for the comment. I am attaching a new
patch with this issue.
Thanks
Ramin
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat, DERBY-3203v2.diff
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549477 ]
Dyre Tjeldvoll commented on DERBY-3203:
---------------------------------------
I think I have resolved the apparent mystery here. The requirement that the argument to ResultSet.setFetchSize(int) be less than Statement.getMaxRows() was dropped in Java 6/JDBC 4, (it is not present in the Java 6 javadoc, but can still be seen in the Java 5 javadoc).
The reason why the client driver doesn't throw an exception in this case is because am.ResultSet incorrectly checks against ResultSet.maxRows_ and NOT am.Statement.getMaxRows(). So when am.Statement.setMaxRows(int) is called after a result set has already been created, am.ResultSet.setFechSize(int) will check against a stale value.
The question is what to do about this. The client driver clearly has a bug, but should we fix it by duplicating the old behavior found in the embedded driver, or change both drivers to comply with latest spec which allows any non-negative value as argument to ResultSet.setFetchSize(int)?
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat, DERBY-3203v2.diff, DERBY-3203v3.diff
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563819#action_12563819 ]
Bryan Pendleton commented on DERBY-3203:
----------------------------------------
I believe that the 4-Dec commit (revision 601058) had a small mistake
in it; I believe that the intent of the patch was to delete statementJdbc20.java
and statementJdbc20.out, as shown by DERBY-3203v0.stat. However, the
actual commit left those files present and empty (0 bytes).
I propose to run
svn delete java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/statementJdbc20.java
svn delete java/testing/org/apache/derbyTesting/functionTests/master/statementJdbc20.out
and commit those deletions to the trunk.
Please let me know if I'm misunderstanding the issue.
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Components: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat, DERBY-3203v2.diff, DERBY-3203v3.diff
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568282#action_12568282 ]
Dyre Tjeldvoll commented on DERBY-3203:
---------------------------------------
Sorry Bryan, I'm a bit behind on my Jira mail. Yes I think you are right. Thanks for fixing this.
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Components: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat, DERBY-3203v2.diff, DERBY-3203v3.diff
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3203) Convert jdbcapi/statementJdbc20.java
to JUnit
Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548404 ]
Daniel John Debrunner commented on DERBY-3203:
----------------------------------------------
Test has several try/catch blocks where I think a failure is expected but the test will pass if the try portion succeeds as there is no fail() assert.
E.g.
try{
rs.setFetchDirection(ResultSet.FETCH_FORWARD);
}catch(SQLException e){
if (usingEmbedded())
assertSQLState("XJ061", e);
else
assertSQLState("XJ125", e);
}
> Convert jdbcapi/statementJdbc20.java to JUnit
> ---------------------------------------------
>
> Key: DERBY-3203
> URL: https://issues.apache.org/jira/browse/DERBY-3203
> Project: Derby
> Issue Type: Test
> Reporter: Ramin Moazeni
> Assignee: Ramin Moazeni
> Fix For: 10.4.0.0
>
> Attachments: DERBY-3203v0.diff, DERBY-3203v0.stat, DERBY-3203v2.diff
>
>
> This issue is creates for converting jdbcapi/statementJdbc20.java to JUnit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.