Derby
  1. Derby
  2. DERBY-4347

Provide a property to increase network server start timeout for JUnit tests

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.5.3.0, 10.6.1.0
    • Fix Version/s: 10.5.3.1, 10.6.1.0
    • Component/s: Test
    • Labels:
      None

      Description

      Sometimes when running JUnit tests with jvm options that are known to slow things down significantly network server start timeouts can occur e.g.
      SecureServerTest( Opened = false, Authenticated= false, CustomDerbyProperties= null, WildCardHost= null )junit.framework.AssertionFailedError: Timed out waiting for network server to start:Spawned SpawnedNetworkServer exitCode=143
      at org.apache.derbyTesting.junit.NetworkServerTestSetup.setUp(NetworkServerTestSetup.java:203)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
      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)
      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 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 current wait time is 40 seconds and is set in org.apache.derbyTesting.junit.NetworkServerTestSetup

      /** Setting maximum wait time to 40 seconds. On some platforms

      • it may take this long to start the server. Increasing the wait
      • time should not adversely affect those
      • systems with fast port turnaround as the actual code loops for
      • SLEEP_TIME intervals, so should never see WAIT_TIME.
        */
        private static final long WAIT_TIME = 40000;

      It would be nice to have system property (maybe derby.tests.networkServerStartTimeout=<ms>) to allow this to be configurable in environments where we expect the start to take longer.

      I am not sure if there are other timeouts in the tests for replication etc or if they all use this same setting.

      1. DERBY-4347.diff
        2 kB
        Myrna van Lunteren
      2. DERBY-4347.diffv2
        3 kB
        Myrna van Lunteren

        Issue Links

          Activity

          Kathey Marsden created issue -
          Kathey Marsden made changes -
          Field Original Value New Value
          Summary Provide a property to increase network server start timeout for JUnitTests Provide a property to increase network server start timeout for JUnit tests
          Myrna van Lunteren made changes -
          Attachment DERBY-4347.diff [ 12418568 ]
          Myrna van Lunteren made changes -
          Issue & fix info [Patch Available]
          Myrna van Lunteren made changes -
          Attachment DERBY-4347.diffv2 [ 12419344 ]
          Myrna van Lunteren made changes -
          Assignee Myrna van Lunteren [ myrna ]
          Issue & fix info [Patch Available]
          Myrna van Lunteren made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 10.5.3.1 [ 12314182 ]
          Fix Version/s 10.6.0.0 [ 12313727 ]
          Resolution Fixed [ 1 ]
          Kathey Marsden made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Workflow jira [ 12472929 ] Default workflow, editable Closed status [ 12800043 ]
          Myrna van Lunteren made changes -
          Link This issue relates to DERBY-3873 [ DERBY-3873 ]

            People

            • Assignee:
              Myrna van Lunteren
              Reporter:
              Kathey Marsden
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development