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 "Deepa Remesh (JIRA)" <de...@db.apache.org> on 2005/11/15 04:25:31 UTC
[jira] Created: (DERBY-706) Improve testing and increase code coverage for Network Server classes
Improve testing and increase code coverage for Network Server classes
---------------------------------------------------------------------
Key: DERBY-706
URL: http://issues.apache.org/jira/browse/DERBY-706
Project: Derby
Type: Improvement
Components: Test
Versions: 10.2.0.0
Reporter: Deepa Remesh
Priority: Minor
Improve testing of network server by increasing tests to cover 100% of the classes and increase the method level coverage. The current code coverage(class/method) for network server based on svn revision 208786 are:
org.apache.derby.drda.NetworkServercontrol.java - 100/72
org.apache.derby.impl.drda - 97/78
Details of code coverage from EMMA tool are available from Derby Wiki. Links are:
http://wiki.apache.org/db-derby/CodeCoverage
http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/c5.html
http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/25.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DERBY-706) Improve testing and increase code coverage for Network Server classes
Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-706?page=all ]
Deepa Remesh updated DERBY-706:
-------------------------------
Attachment: derby-706.diff
derby-706.status
Attaching first patch 'derby-706.diff' for this. This patch adds some tests for network server and re-arranges/removes some internal methods which are not used. Details of patch are:
* derbynet/getCurrentProperties.java - Added tests for NetworkServerControl.logConnections and setTraceDirectory methods. Modified getCurrentProperties_sed.properties to use a substitute instead of delete for traceDirectory.
* derbynet/testProperties.java - Added some more command line tests.
* derbynet/timeslice.java and maxthreads.java - Added tests for invalid values.
* derbynet/runtimeinfo.java and sysinfo.java - Added test to call methods in NetworkServer control
* Modified master files.
* DRDAResultSet.java - removed unused constructor "DRDAResultSet(ResultSet rs)"
* DRDAStatement.java - Changed getNumRsCols() to use getRsDRDATypes() instead of directly calling DRDAResultSet method. Removed isProcedure() method which is not used. Changed getResultSetCursorName() to call drdaRs.getResultSetCursorName() which handles case for null result set.
* NetworkServerControlImpl.java - Removed methods for connection pooling which is not implemented and not used.
With this patch, I ran derbyall with Sun JDK 1.4.2. No failures. Please review/commit this patch.
> Improve testing and increase code coverage for Network Server classes
> ---------------------------------------------------------------------
>
> Key: DERBY-706
> URL: http://issues.apache.org/jira/browse/DERBY-706
> Project: Derby
> Type: Improvement
> Components: Test
> Versions: 10.2.0.0
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Priority: Minor
> Attachments: derby-706.diff, derby-706.status
>
> Improve testing of network server by increasing tests to cover 100% of the classes and increase the method level coverage. The current code coverage(class/method) for network server based on svn revision 208786 are:
> org.apache.derby.drda.NetworkServercontrol.java - 100/72
> org.apache.derby.impl.drda - 97/78
> Details of code coverage from EMMA tool are available from Derby Wiki. Links are:
> http://wiki.apache.org/db-derby/CodeCoverage
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/c5.html
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/25.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DERBY-706) Improve testing and increase code coverage for Network Server classes
Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-706?page=all ]
Deepa Remesh updated DERBY-706:
-------------------------------
Attachment: derby-706_2_v2.diff
Thanks for catching this, Kathey. I have uploaded derby-706_2_v2.diff.
> Improve testing and increase code coverage for Network Server classes
> ---------------------------------------------------------------------
>
> Key: DERBY-706
> URL: http://issues.apache.org/jira/browse/DERBY-706
> Project: Derby
> Type: Improvement
> Components: Test
> Versions: 10.2.0.0
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Priority: Minor
> Attachments: derby-706.diff, derby-706.status, derby-706_2.status, derby-706_2_v2.diff
>
> Improve testing of network server by increasing tests to cover 100% of the classes and increase the method level coverage. The current code coverage(class/method) for network server based on svn revision 208786 are:
> org.apache.derby.drda.NetworkServercontrol.java - 100/72
> org.apache.derby.impl.drda - 97/78
> Details of code coverage from EMMA tool are available from Derby Wiki. Links are:
> http://wiki.apache.org/db-derby/CodeCoverage
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/c5.html
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/25.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DERBY-706) Improve testing and increase code coverage for Network Server classes
Posted by "Anonymous (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-706?page=all ]
updated DERBY-706:
-------------------
Attachment: derby-706_2.diff
derby-706_2.status
> Improve testing and increase code coverage for Network Server classes
> ---------------------------------------------------------------------
>
> Key: DERBY-706
> URL: http://issues.apache.org/jira/browse/DERBY-706
> Project: Derby
> Type: Improvement
> Components: Test
> Versions: 10.2.0.0
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Priority: Minor
> Attachments: derby-706.diff, derby-706.status, derby-706_2.diff, derby-706_2.status
>
> Improve testing of network server by increasing tests to cover 100% of the classes and increase the method level coverage. The current code coverage(class/method) for network server based on svn revision 208786 are:
> org.apache.derby.drda.NetworkServercontrol.java - 100/72
> org.apache.derby.impl.drda - 97/78
> Details of code coverage from EMMA tool are available from Derby Wiki. Links are:
> http://wiki.apache.org/db-derby/CodeCoverage
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/c5.html
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/25.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (DERBY-706) Improve testing and increase code coverage for Network Server classes
Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-706?page=all ]
Deepa Remesh updated DERBY-706:
-------------------------------
Attachment: (was: derby-706_2.diff)
> Improve testing and increase code coverage for Network Server classes
> ---------------------------------------------------------------------
>
> Key: DERBY-706
> URL: http://issues.apache.org/jira/browse/DERBY-706
> Project: Derby
> Type: Improvement
> Components: Test
> Versions: 10.2.0.0
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Priority: Minor
> Attachments: derby-706.diff, derby-706.status, derby-706_2.status
>
> Improve testing of network server by increasing tests to cover 100% of the classes and increase the method level coverage. The current code coverage(class/method) for network server based on svn revision 208786 are:
> org.apache.derby.drda.NetworkServercontrol.java - 100/72
> org.apache.derby.impl.drda - 97/78
> Details of code coverage from EMMA tool are available from Derby Wiki. Links are:
> http://wiki.apache.org/db-derby/CodeCoverage
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/c5.html
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/25.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-706) Improve testing and increase code coverage for Network Server classes
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-706?page=comments#action_12360022 ]
Kathey Marsden commented on DERBY-706:
--------------------------------------
Hi Deepa,
Your patch looks good except for this System.out in DRDAConnThread.
System.out.println("ccsidSBCEncoding - " + ccsidSBCEncoding);
> Improve testing and increase code coverage for Network Server classes
> ---------------------------------------------------------------------
>
> Key: DERBY-706
> URL: http://issues.apache.org/jira/browse/DERBY-706
> Project: Derby
> Type: Improvement
> Components: Test
> Versions: 10.2.0.0
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Priority: Minor
> Attachments: derby-706.diff, derby-706.status, derby-706_2.diff, derby-706_2.status
>
> Improve testing of network server by increasing tests to cover 100% of the classes and increase the method level coverage. The current code coverage(class/method) for network server based on svn revision 208786 are:
> org.apache.derby.drda.NetworkServercontrol.java - 100/72
> org.apache.derby.impl.drda - 97/78
> Details of code coverage from EMMA tool are available from Derby Wiki. Links are:
> http://wiki.apache.org/db-derby/CodeCoverage
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/c5.html
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/25.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-706) Improve testing and increase code coverage for Network Server classes
Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-706?page=comments#action_12359665 ]
Deepa Remesh commented on DERBY-706:
------------------------------------
I have attached a second patch 'derby-706_2.diff' which adds some more tests and re-arranges/removes some internal methods. Details of patch are:
* DDMWriter: Removes min method because Math.min is used. Use doesRequestContainData() method.
* DDMReader: Use readCodePoint() method
* DRDAConnThread: QRYOPTVAL codepoint is not part of DRDA spec. parseCcsidSBC was giving NPE.
* CodePointNameTable: Add codepoints to be used in protocol.tests
* protocol.tests: Added tests to cover methods which were not tested before.
* Session, DRDAStatement, Database, DRDAProtocolException: Remove some methods which are not needed. The same can be done using other methods.
* TestProto: Use lookup method.
* testProtocol: Added "derby.drda.traceAll=true" to derby.properties file to test methods in DssTrace
* testProperties: Added test for trace off command. Added "derby.drda.traceAll=true" to derby.properties file to test memcheck.
* runtimeinfo: Rearranged test because the output was not predictable on different jvms/machines.
Ran derbyall with Sun JDK 1.4.2 on WinXP. No failures. Please review/commit this patch.
Kathey, I looked into your question:
//this looks highly suspect. Why does timeSlice setSoTimeout?
if (timeSlice != 0)
clientSocket.setSoTimeout(timeSlice);
>From what I understand, setSoTimeout socket option is used so that a thread waits only for the time specified. Otherwise for blocking operations, a thread can wait indefinitely. In case of network server, it can wait indefinitely without considering value specified in timeslice property. I have not included the test for these in this patch.
I have couple of questions:
1. In one case where agentError is thrown (DRDAConnThread#parseNOCMorNOCS), it seems to me that a syntax error should be thrown here. For agentErrors, no code point is sent back to the client. In DDM manual, I saw AGNPRMRM is used for severe agent errors. Is there something else which can be sent back for non-severe errors?
2. QRYINSID is checked in CNTQRY and CLSQRY but it is not being used. Should this be used?
I would appreciate if someone can provide answers for above. Thanks.
> Improve testing and increase code coverage for Network Server classes
> ---------------------------------------------------------------------
>
> Key: DERBY-706
> URL: http://issues.apache.org/jira/browse/DERBY-706
> Project: Derby
> Type: Improvement
> Components: Test
> Versions: 10.2.0.0
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Priority: Minor
> Attachments: derby-706.diff, derby-706.status, derby-706_2.diff, derby-706_2.status
>
> Improve testing of network server by increasing tests to cover 100% of the classes and increase the method level coverage. The current code coverage(class/method) for network server based on svn revision 208786 are:
> org.apache.derby.drda.NetworkServercontrol.java - 100/72
> org.apache.derby.impl.drda - 97/78
> Details of code coverage from EMMA tool are available from Derby Wiki. Links are:
> http://wiki.apache.org/db-derby/CodeCoverage
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/c5.html
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/25.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-706) Improve testing and increase code coverage for Network Server classes
Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-706?page=comments#action_12358423 ]
Kathey Marsden commented on DERBY-706:
--------------------------------------
I committted this change.
My only comment is that for setMaxThreads/setTimeSlice I think that we need to make sure that the functionality is tested in addition to adding the api call. I don't think there are any tests that currently test that the timeslice is working properly.
In addition to the fact that we don't have tests for this I once noticed something in CllientThread and put a comment in the code but never actually filed a bug, but it makes me think that there might be a problem with setTimeSlice.
//this looks highly suspect. Why does timeSlice setSoTimeout?
if (timeSlice != 0)
clientSocket.setSoTimeout(timeSlice);
Let me know if you want input on how to test this.
> Improve testing and increase code coverage for Network Server classes
> ---------------------------------------------------------------------
>
> Key: DERBY-706
> URL: http://issues.apache.org/jira/browse/DERBY-706
> Project: Derby
> Type: Improvement
> Components: Test
> Versions: 10.2.0.0
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Priority: Minor
> Attachments: derby-706.diff, derby-706.status
>
> Improve testing of network server by increasing tests to cover 100% of the classes and increase the method level coverage. The current code coverage(class/method) for network server based on svn revision 208786 are:
> org.apache.derby.drda.NetworkServercontrol.java - 100/72
> org.apache.derby.impl.drda - 97/78
> Details of code coverage from EMMA tool are available from Derby Wiki. Links are:
> http://wiki.apache.org/db-derby/CodeCoverage
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/c5.html
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/25.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (DERBY-706) Improve testing and increase code
coverage for Network Server classes
Posted by "John H. Embretsen (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-706?page=comments#action_12428350 ]
John H. Embretsen commented on DERBY-706:
-----------------------------------------
Seems like SVN revision 356553 (patch 'derby-706_2.diff') did not apply cleanly. The file
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties_derby.properties
is "corrupt"; it includes for some reason the following text three times (without line breaks between each, so it looks cluttered):
#defaults
derby.infolog.append=true
derby.locks.waitTimeout=120
derby.language.logStatementText=true
#added to cover call to memCheck class
derby.drda.debug=true
See http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties_derby.properties?view=markup
I am not sure if this has affected the test in any way, but it should be fixed. See also DERBY-1694.
> Improve testing and increase code coverage for Network Server classes
> ---------------------------------------------------------------------
>
> Key: DERBY-706
> URL: http://issues.apache.org/jira/browse/DERBY-706
> Project: Derby
> Issue Type: Improvement
> Components: Test
> Affects Versions: 10.2.0.0
> Reporter: Deepa Remesh
> Assigned To: Deepa Remesh
> Priority: Minor
> Fix For: 10.2.0.0
>
> Attachments: derby-706.diff, derby-706.status, derby-706_2.status, derby-706_2_v2.diff
>
>
> Improve testing of network server by increasing tests to cover 100% of the classes and increase the method level coverage. The current code coverage(class/method) for network server based on svn revision 208786 are:
> org.apache.derby.drda.NetworkServercontrol.java - 100/72
> org.apache.derby.impl.drda - 97/78
> Details of code coverage from EMMA tool are available from Derby Wiki. Links are:
> http://wiki.apache.org/db-derby/CodeCoverage
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/c5.html
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/25.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (DERBY-706) Improve testing and increase code coverage for Network Server classes
Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-706?page=all ]
Deepa Remesh reassigned DERBY-706:
----------------------------------
Assign To: Deepa Remesh
> Improve testing and increase code coverage for Network Server classes
> ---------------------------------------------------------------------
>
> Key: DERBY-706
> URL: http://issues.apache.org/jira/browse/DERBY-706
> Project: Derby
> Type: Improvement
> Components: Test
> Versions: 10.2.0.0
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Priority: Minor
>
> Improve testing of network server by increasing tests to cover 100% of the classes and increase the method level coverage. The current code coverage(class/method) for network server based on svn revision 208786 are:
> org.apache.derby.drda.NetworkServercontrol.java - 100/72
> org.apache.derby.impl.drda - 97/78
> Details of code coverage from EMMA tool are available from Derby Wiki. Links are:
> http://wiki.apache.org/db-derby/CodeCoverage
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/c5.html
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/25.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (DERBY-706) Improve testing and increase code
coverage for Network Server classes
Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-706?page=all ]
Deepa Remesh resolved DERBY-706:
--------------------------------
Fix Version: 10.2.0.0
Resolution: Fixed
With svn revisions 348577 and 356553 , code coverage was increased to:
* org.apache.derby.drda increase NetworkServercontrol.java - 100/72 -> 100/94
Method coverage is not 100% because 1 method (setClientLocale) is left out from automated test. It is only used by servlet.
* org.apache.derby.drda.impl.drda - 97/78 -> 100->85
> Improve testing and increase code coverage for Network Server classes
> ---------------------------------------------------------------------
>
> Key: DERBY-706
> URL: http://issues.apache.org/jira/browse/DERBY-706
> Project: Derby
> Type: Improvement
> Components: Test
> Versions: 10.2.0.0
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Priority: Minor
> Fix For: 10.2.0.0
> Attachments: derby-706.diff, derby-706.status, derby-706_2.status, derby-706_2_v2.diff
>
> Improve testing of network server by increasing tests to cover 100% of the classes and increase the method level coverage. The current code coverage(class/method) for network server based on svn revision 208786 are:
> org.apache.derby.drda.NetworkServercontrol.java - 100/72
> org.apache.derby.impl.drda - 97/78
> Details of code coverage from EMMA tool are available from Derby Wiki. Links are:
> http://wiki.apache.org/db-derby/CodeCoverage
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/c5.html
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/25.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Closed: (DERBY-706) Improve testing and increase code
coverage for Network Server classes
Posted by "Deepa Remesh (JIRA)" <de...@db.apache.org>.
[ http://issues.apache.org/jira/browse/DERBY-706?page=all ]
Deepa Remesh closed DERBY-706:
------------------------------
> Improve testing and increase code coverage for Network Server classes
> ---------------------------------------------------------------------
>
> Key: DERBY-706
> URL: http://issues.apache.org/jira/browse/DERBY-706
> Project: Derby
> Type: Improvement
> Components: Test
> Versions: 10.2.0.0
> Reporter: Deepa Remesh
> Assignee: Deepa Remesh
> Priority: Minor
> Fix For: 10.2.0.0
> Attachments: derby-706.diff, derby-706.status, derby-706_2.status, derby-706_2_v2.diff
>
> Improve testing of network server by increasing tests to cover 100% of the classes and increase the method level coverage. The current code coverage(class/method) for network server based on svn revision 208786 are:
> org.apache.derby.drda.NetworkServercontrol.java - 100/72
> org.apache.derby.impl.drda - 97/78
> Details of code coverage from EMMA tool are available from Derby Wiki. Links are:
> http://wiki.apache.org/db-derby/CodeCoverage
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/c5.html
> http://people.apache.org/~fuzzylogic/codecoverage/208786/_files/25.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira