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 "Kathey Marsden (JIRA)" <ji...@apache.org> on 2012/08/29 02:44:07 UTC

[jira] [Created] (DERBY-5912) testIsValidImplemented fails for NetworkServer in some slow running machines/configurations

Kathey Marsden created DERBY-5912:
-------------------------------------

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


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

[jira] [Resolved] (DERBY-5912) testIsValidImplemented fails for NetworkServer in some slow running machines/configurations

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren resolved DERBY-5912.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.10.0.0
                   10.9.1.1
                   10.8.2.3

backported the fix to 10.9 with revision http://svn.apache.org/viewvc?view=revision&revision=1379219 and backported that to 10.8 with revision http://svn.apache.org/viewvc?view=revision&amp;revision=1379230.

Resolving - if we think of an automated way to test the timeout we can open a new issue for that specifically.
                
> 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

[jira] [Commented] (DERBY-5912) testIsValidImplemented fails for NetworkServer in some slow running machines/configurations

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ 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

[jira] [Commented] (DERBY-5912) testIsValidImplemented fails for NetworkServer in some slow running machines/configurations

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449979#comment-13449979 ] 

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

Kathey was right, when I tested this manually the connection  following the timeout indeed had become unavailable. I logged DERBY-5919 for this.

The location of the sleep in EXCSQLIMM was not right, because the isValid call is actually a prepared statement call, see NetConnection40:
         "...
                // Set the query timeout
                isValidStmt.setQueryTimeout(timeout);

                // Run the query against the database
                ResultSet rs = isValidStmt.executeQuery();
                rs.close();
         ...  "

After some discussion with Kathey, I first tried the sleep in CodePoint.PRPSQLSTT, but that wasn't correct either, because before the above code snippet, NetConnection40 has this:
      
         "....
                if (isValidStmt == null) {
                    isValidStmt = prepareStatement("VALUES (1)");
                } 
          ..."
 
Kathey said: So the prepareStatment() won't happen  the second time and so we won't go through PRPSQLSTT on the server.
The right location for the sleep is in CodePoint.OPNQRY.

I modified the current test with a test case that will not run unless one removes a 'x' in front of the fixture name, and added the sleep, but commented out, into DRDAConnThread.

I also noticed the comment saying that isValid was also tested in TestConnectionMethods.java.
That test has been converted to junit and renamed ConnectionMethodsTest, so I updated the comment.
I also modified ConnectionMethodsTest to have a longer timeout.

I will attach these changes as patch, then commit these changes shortly.
                
> 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

[jira] [Commented] (DERBY-5912) testIsValidImplemented fails for NetworkServer in some slow running machines/configurations

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449989#comment-13449989 ] 

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

committed with revision: http://svn.apache.org/viewvc?view=revision&revision=1381731
The change to ConnectionMethodsTest can be backported to 10.9 and 10.8 if needed (and the name correction in the comment in ConnectionTest) .
                
> 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_2.diff, 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

[jira] [Updated] (DERBY-5912) testIsValidImplemented fails for NetworkServer in some slow running machines/configurations

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-5912:
--------------------------------------

    Attachment: DERBY-5912.diff

Attaching a patch which basically just sets a -arbitrarily chosen - really long timeout. For most machines this shouldn't matter as it normally doesn't time out.

Looks from the comments in DERBY-1090 that Olav tested the time-out by adding a 'sleep' somewhere in the network server code. Does anyone have any suggestions on how to cause a time-out for this case so it can be tested for? 
                
> 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
>         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

[jira] [Commented] (DERBY-5912) testIsValidImplemented fails for NetworkServer in some slow running machines/configurations

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455068#comment-13455068 ] 

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

Backported the comment change, and the change to ConnectionMethodsTest to 10.9 with revision 1384397 (http://svn.apache.org/viewvc?view=revision&revision=1384397), and to 10.8 with revision 1384432 (http://svn.apache.org/viewvc?view=revision&revision=1384432).
                
> 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_2.diff, 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

[jira] [Assigned] (DERBY-5912) testIsValidImplemented fails for NetworkServer in some slow running machines/configurations

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren reassigned DERBY-5912:
-----------------------------------------

    Assignee: Myrna van Lunteren
    
> 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
>         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

[jira] [Updated] (DERBY-5912) testIsValidImplemented fails for NetworkServer in some slow running machines/configurations

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-5912:
--------------------------------------

    Issue & fix info: Patch Available
    
> 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
>         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

[jira] [Updated] (DERBY-5912) testIsValidImplemented fails for NetworkServer in some slow running machines/configurations

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-5912:
--------------------------------------

    Attachment: DERBY-5912_2.diff

Attaching a patch that:
- changes the timeout in ConnectionMethodsTest from isValid(1) to isValid(200) and adds a comment
- updates the comment in ConnectionTest so it refers to ConnectionMethodsTest
- has commented out sleep code in DRDAConnThread that can be uncommented to test this
- adds a fixture, testIsValidWithTimeout, that is disabled by having an 'x' in front of it, to ConnectionTest.
                
> 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_2.diff, 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

[jira] [Updated] (DERBY-5912) testIsValidImplemented fails for NetworkServer in some slow running machines/configurations

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-5912:
--------------------------------------

    Issue & fix info:   (was: Patch Available)

I committed the change with revision http://svn.apache.org/viewvc?view=revision&revision=1379163
                
> 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
>         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