db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5912) testIsValidImplemented fails for NetworkServer in some slow running machines/configurations
Date Tue, 04 Sep 2012 16:44:07 GMT

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

Kathey Marsden commented on DERBY-5912:
---------------------------------------

I could not think of an automated way to to test the timeout, but it occurred to me that it
would be worth testing manually because I think maybe the current client code would actually
cause the connection to become invalid if it timed out because  socket_.setSoTimeout would
cause permanent loss of the connection if it timed out.  There may be some recovery mechanism
that I am missing though.  I think you can force a timeout by putting a sleep in DRDAConnThread.processCommands()
right after this code:
                case CodePoint.EXCSQLIMM:
                    try {






                
> testIsValidImplemented fails for NetworkServer in some slow running machines/configurations
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5912
>                 URL: https://issues.apache.org/jira/browse/DERBY-5912
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.8.2.3
>            Reporter: Kathey Marsden
>            Assignee: Myrna van Lunteren
>             Fix For: 10.8.2.3, 10.9.1.1, 10.10.0.0
>
>         Attachments: DERBY-5912.diff
>
>
> The following test has been seen to fail as below  in some runs where the machine is
under heavy load  and slow running options are specified and the isValid() call takes more
than a second to return.
> 1) testIsValidImplemented(org.apache.derbyTesting.functionTests.tests.jdbc4.ConnectionTest)junit.framework.AssertionFailedError
> 	at org.apache.derbyTesting.functionTests.tests.jdbc4.ConnectionTest.testIsValidImplemented(ConnectionTest.java:168)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:113)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> 	at junit.extensions.TestSetup.run(TestSetup.java:23)
> The test does:
>    // Test with a 1 second timeout
>         assertTrue(getConnection().isValid(1));
> assuming it will return in one second.  For embedded the int parameter is not implemented
so indeed this always passes. For the Network implementation in NetConnection40.java we actually
do timeout and perform a query as part of the implementation so might indeed return false.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message