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 "Sunitha Kambhampati (JIRA)" <de...@db.apache.org> on 2006/09/22 19:07:22 UTC

[jira] Created: (DERBY-1878) Improve error handling in network server tests

Improve error handling in network server tests
----------------------------------------------

                 Key: DERBY-1878
                 URL: http://issues.apache.org/jira/browse/DERBY-1878
             Project: Derby
          Issue Type: Improvement
          Components: Test
    Affects Versions: 10.3.0.0
            Reporter: Sunitha Kambhampati
            Priority: Minor
             Fix For: 10.3.0.0


Some network server tests (specially those that spawn new process) have bad error handling that results in the test hanging forever if it fails, thus holding up execution of a nightly test run.    The tests must timeout instead of hanging forever if it fails. 

Please see http://issues.apache.org/jira/browse/DERBY-1694#action_12435129  for some possible improvements. 



-- 
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-1878) Improve error handling in network server tests

Posted by "Sunitha Kambhampati (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1878?page=all ]

Sunitha Kambhampati resolved DERBY-1878.
----------------------------------------

    Resolution: Fixed

> Improve error handling in network server tests
> ----------------------------------------------
>
>                 Key: DERBY-1878
>                 URL: http://issues.apache.org/jira/browse/DERBY-1878
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.2.1.6, 10.3.0.0
>            Reporter: Sunitha Kambhampati
>         Assigned To: Sunitha Kambhampati
>            Priority: Minor
>             Fix For: 10.2.2.0, 10.3.0.0
>
>         Attachments: derby1878.diff.txt, derby1878.stat.txt
>
>
> Some network server tests (specially those that spawn new process) have bad error handling that results in the test hanging forever if it fails, thus holding up execution of a nightly test run.    The tests must timeout instead of hanging forever if it fails. 
> Please see http://issues.apache.org/jira/browse/DERBY-1694#action_12435129  for some possible improvements. 

-- 
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-1878) Improve error handling in network server tests

Posted by "Sunitha Kambhampati (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1878?page=all ]

Sunitha Kambhampati updated DERBY-1878:
---------------------------------------

    Affects Version/s: 10.2.1.5
             Assignee: Sunitha Kambhampati
           Derby Info: [Patch Available]

> Improve error handling in network server tests
> ----------------------------------------------
>
>                 Key: DERBY-1878
>                 URL: http://issues.apache.org/jira/browse/DERBY-1878
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.3.0.0, 10.2.1.5
>            Reporter: Sunitha Kambhampati
>         Assigned To: Sunitha Kambhampati
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: derby1878.diff.txt, derby1878.stat.txt
>
>
> Some network server tests (specially those that spawn new process) have bad error handling that results in the test hanging forever if it fails, thus holding up execution of a nightly test run.    The tests must timeout instead of hanging forever if it fails. 
> Please see http://issues.apache.org/jira/browse/DERBY-1694#action_12435129  for some possible improvements. 

-- 
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-1878) Improve error handling in network server tests

Posted by "Mike Matrigali (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1878?page=all ]

Mike Matrigali updated DERBY-1878:
----------------------------------


I committed this test only patch into the trunk.  I ran full set of succesful tests against xp/ibm142 jdk.

m3_ibm142:33>svn commit

Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNe
tClient\testij.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\testij.
out
Sending        java\testing\org\apache\derbyTesting\functionTests\tests\derbynet
\maxthreads.java
Sending        java\testing\org\apache\derbyTesting\functionTests\tests\derbynet
\runtimeinfo.java
Sending        java\testing\org\apache\derbyTesting\functionTests\tests\derbynet
\sysinfo.java
Sending        java\testing\org\apache\derbyTesting\functionTests\tests\derbynet
\testconnection.java
Sending        java\testing\org\apache\derbyTesting\functionTests\tests\derbynet
\testij.java
Sending        java\testing\org\apache\derbyTesting\functionTests\tests\derbynet
\timeslice.java
Adding         java\testing\org\apache\derbyTesting\functionTests\util\ExecProcU
til.java
Transmitting file data .........
Committed revision 450508.

> Improve error handling in network server tests
> ----------------------------------------------
>
>                 Key: DERBY-1878
>                 URL: http://issues.apache.org/jira/browse/DERBY-1878
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.3.0.0, 10.2.1.5
>            Reporter: Sunitha Kambhampati
>         Assigned To: Sunitha Kambhampati
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: derby1878.diff.txt, derby1878.stat.txt
>
>
> Some network server tests (specially those that spawn new process) have bad error handling that results in the test hanging forever if it fails, thus holding up execution of a nightly test run.    The tests must timeout instead of hanging forever if it fails. 
> Please see http://issues.apache.org/jira/browse/DERBY-1694#action_12435129  for some possible improvements. 

-- 
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-1878) Improve error handling in network server tests

Posted by "Sunitha Kambhampati (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1878?page=all ]

Sunitha Kambhampati updated DERBY-1878:
---------------------------------------

    Fix Version/s: 10.2.2.0
       Derby Info:   (was: [Patch Available])

This has been ported to 10.2.  Thanks Mike. 

> Improve error handling in network server tests
> ----------------------------------------------
>
>                 Key: DERBY-1878
>                 URL: http://issues.apache.org/jira/browse/DERBY-1878
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.3.0.0, 10.2.1.5
>            Reporter: Sunitha Kambhampati
>         Assigned To: Sunitha Kambhampati
>            Priority: Minor
>             Fix For: 10.3.0.0, 10.2.2.0
>
>         Attachments: derby1878.diff.txt, derby1878.stat.txt
>
>
> Some network server tests (specially those that spawn new process) have bad error handling that results in the test hanging forever if it fails, thus holding up execution of a nightly test run.    The tests must timeout instead of hanging forever if it fails. 
> Please see http://issues.apache.org/jira/browse/DERBY-1694#action_12435129  for some possible improvements. 

-- 
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-1878) Improve error handling in network server tests

Posted by "Sunitha Kambhampati (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1878?page=all ]

Sunitha Kambhampati closed DERBY-1878.
--------------------------------------


> Improve error handling in network server tests
> ----------------------------------------------
>
>                 Key: DERBY-1878
>                 URL: http://issues.apache.org/jira/browse/DERBY-1878
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.2.1.6, 10.3.0.0
>            Reporter: Sunitha Kambhampati
>         Assigned To: Sunitha Kambhampati
>            Priority: Minor
>             Fix For: 10.3.0.0, 10.2.2.0
>
>         Attachments: derby1878.diff.txt, derby1878.stat.txt
>
>
> Some network server tests (specially those that spawn new process) have bad error handling that results in the test hanging forever if it fails, thus holding up execution of a nightly test run.    The tests must timeout instead of hanging forever if it fails. 
> Please see http://issues.apache.org/jira/browse/DERBY-1694#action_12435129  for some possible improvements. 

-- 
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-1878) Improve error handling in network server tests

Posted by "Sunitha Kambhampati (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1878?page=all ]

Sunitha Kambhampati updated DERBY-1878:
---------------------------------------

    Attachment: derby1878.diff.txt
                derby1878.stat.txt

I am attaching the patch (derby1878.diff.txt) to improve some error handling in some of the network server tests. 

1.The execCmdDumpResults used by the five tests timeslice.java,maxthreads.java,testij.java,runtimeinfo.java,sysinfo.java suffer from the same problems that was fixed for testProperties.java namely 
	-- the outputstream for the sub process's is not flushed out 
	-- there is no timeout handling for the ProcessStreamResult
2.Eliminate duplication of code in these 5 tests for execCmdDumpResults(String[] args) method.  The execCmdDumpResults method basically exec's a new process and then waits for the process to dump the results. A new utility class - ExecProcUtil is added with execCmdDumpResults that is generalized to take the necessary input from the tests as well as fixes the issues mentioned in #1.   The OutputStream is flushed out by calling bos.flush and System.out.flush and the timeout is added for ProcessStreamResult. 
3.Make use of the TimedProcess to kill process if process does not exit within the timeout period.
4.TestConnection.java test has some variation of the execCmdDumpResults and it also adds some testcases into this method. Hence this method in this test is left as is and timeout handling is added. 
5.testij.out has been updated. The previous master file was eating away the last line that was written to System.out, but now that the process's streams are flushed properly, the last line in testij.out test which prints out 'End test' 
is also seen in the output file. 

Also noticed that these tests - like timeslice.java, maxthreads.java all seem to set the properties for the server and then check if the property is set. The functionality of the server when these properties is set is not being tested. It will be good to add tests that test that the functionality itself is working as expected or not. Please note, recently connecting to server with timeslice options discovered some issues with server (see DERBY-1856).

This is a test only change for network server. derbyall on windows/jdk142 ran ok with no failures. 

Can someone please review this patch. Thanks.


> Improve error handling in network server tests
> ----------------------------------------------
>
>                 Key: DERBY-1878
>                 URL: http://issues.apache.org/jira/browse/DERBY-1878
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Sunitha Kambhampati
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: derby1878.diff.txt, derby1878.stat.txt
>
>
> Some network server tests (specially those that spawn new process) have bad error handling that results in the test hanging forever if it fails, thus holding up execution of a nightly test run.    The tests must timeout instead of hanging forever if it fails. 
> Please see http://issues.apache.org/jira/browse/DERBY-1694#action_12435129  for some possible improvements. 

-- 
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