Derby
  1. Derby
  2. DERBY-5598

testStartWithPrintWriter(org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetNewServerTest)junit.framework.AssertionFailedError: Num of log item should add

    Details

    • Bug behavior facts:
      Regression Test Failure

      Description

      I saw this failure on 10.8 IBM 1.6 on Windows for Feb 1, 2012, build 1239450

      testStartWithPrintWriter(org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetNewServerTest)junit.framework.AssertionFailedError: Num of log item should add
      at org.apache.derbyTesting.functionTests.tests.derbynet.DerbyNetNewServerTest.testStartWithPrintWriter(DerbyNetNewServerTest.java:95)
      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)

      http://people.apache.org/~myrnavl/derby_test_results/v10_8/windows/testlog/ibm16/1239450-suites.All_diff.txt

      1. d5598.diff
        1 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          Knut Anders Hatlen made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hide
          Knut Anders Hatlen added a comment -

          [bulk update: close all resolved issues that haven't had any activity the last year]

          Show
          Knut Anders Hatlen added a comment - [bulk update: close all resolved issues that haven't had any activity the last year]
          Gavin made changes -
          Workflow jira [ 12651812 ] Default workflow, editable Closed status [ 12802119 ]
          Kathey Marsden made changes -
          Affects Version/s 10.8.3.0 [ 12323456 ]
          Affects Version/s 10.8.2.3 [ 12318540 ]
          Fix Version/s 10.8.3.0 [ 12323456 ]
          Fix Version/s 10.8.2.3 [ 12318540 ]
          Knut Anders Hatlen made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Issue & fix info Patch Available [ 10102 ]
          Fix Version/s 10.8.2.3 [ 12318540 ]
          Fix Version/s 10.9.0.0 [ 12316344 ]
          Resolution Fixed [ 1 ]
          Hide
          Knut Anders Hatlen added a comment -

          Committed revision 1241841.
          Merged to 10.8 and committed revision 1241842.

          Show
          Knut Anders Hatlen added a comment - Committed revision 1241841. Merged to 10.8 and committed revision 1241842.
          Knut Anders Hatlen made changes -
          Assignee Knut Anders Hatlen [ knutanders ]
          Issue & fix info Patch Available [ 10102 ]
          Knut Anders Hatlen made changes -
          Attachment d5598.diff [ 12513627 ]
          Hide
          Knut Anders Hatlen added a comment -

          This problem looks similar to DERBY-4201, and it reproduces consistently in my environment with the repro.diff patch attached to that issue.

          The problem is that NetworkServerControl.shutdown() returns once the server socket stops responding, whereas NetworkServerControlImpl.blockingStart() doesn't print the message about successful shutdown until after the server socket has been closed. So it is possible that the test checks the contents of the log after the server socket has been closed, but before the message has actually been written to the log.

          The attached patch attempts to solve this race condition by making the test wait and re-read the log if the message doesn't show up immediately. This makes the test pass in my environment, also in combination with the repro patch from DERBY-4201.

          Show
          Knut Anders Hatlen added a comment - This problem looks similar to DERBY-4201 , and it reproduces consistently in my environment with the repro.diff patch attached to that issue. The problem is that NetworkServerControl.shutdown() returns once the server socket stops responding, whereas NetworkServerControlImpl.blockingStart() doesn't print the message about successful shutdown until after the server socket has been closed. So it is possible that the test checks the contents of the log after the server socket has been closed, but before the message has actually been written to the log. The attached patch attempts to solve this race condition by making the test wait and re-read the log if the message doesn't show up immediately. This makes the test pass in my environment, also in combination with the repro patch from DERBY-4201 .
          Knut Anders Hatlen made changes -
          Link This issue relates to DERBY-4201 [ DERBY-4201 ]
          Knut Anders Hatlen made changes -
          Field Original Value New Value
          Link This issue relates to DERBY-5547 [ DERBY-5547 ]
          Kathey Marsden created issue -

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Kathey Marsden
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development