Qpid
  1. Qpid
  2. QPID-3566

ConnectionCloseTest fails with spurious thread creation

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.13
    • Fix Version/s: 0.15
    • Component/s: Java Tests
    • Labels:
      None
    • Environment:

      Fedora 15 x86_64

      java version "1.6.0_22"
      OpenJDK Runtime Environment (IcedTea6 1.10.4) (fedora-60.1.10.4.fc15-x86_64)
      OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

      Description

      Testsuite: org.apache.qpid.test.unit.client.connection.ConnectionCloseTest
      Tests run: 2, Failures: 1, Errors: 0, Time elapsed: 31.176 sec

      Testcase: testSendReceiveClose took 31.009 sec
      FAILED
      Spurious thread creation exceeded threshold, 10 threads created.
      junit.framework.AssertionFailedError: Spurious thread creation exceeded threshold, 10 threads created.
      at org.apache.qpid.test.unit.client.connection.ConnectionCloseTest.testSendReceiveClose(ConnectionCloseTest.java:97)
      at org.apache.qpid.test.utils.QpidBrokerTestCase.runBare(QpidBrokerTestCase.java:240)
      at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:135)

      Testcase: testConnectionCloseOnOnForcibleBrokerStop took 0.164 sec

        Issue Links

          Activity

          Hide
          Robbie Gemmell added a comment -

          Agreed.

          Show
          Robbie Gemmell added a comment - Agreed.
          Hide
          Keith Wall added a comment -

          With the removal of MINA, the test case ConnectionCloseTest#testSendReceiveClose is no longer valuable. Test case removed.

          Show
          Keith Wall added a comment - With the removal of MINA, the test case ConnectionCloseTest#testSendReceiveClose is no longer valuable. Test case removed.
          Hide
          Keith Wall added a comment -

          I can see from the test output that the test profile was the default java-mms.0-10 and as such Java Broker and Java client are co-located in the same VM.

          The heuristic used by the test to calculate the number of additional threads that may remain after the test is broken. It is relying on QpidBrokerTestCase#isExternalBroker which is currently always returning true even when broker and client are co-located within the same VM. As a result, the threshold applied is half that that the author intended.

          This test normally does not fail, so I suspect that you were victim of unlucky timing. I notice that the Virtual Host's housekeeping thread happened to be in progress when the test made the measurement.

          I think we need to:

          1) Fix QpidBrokerTestCase#isExternalBroker and the tests that use it.
          2) Consider whether this is still a valuable test as the threading model used by the application is very different since the removal of Mina.

          I think neither of these changes are sufficiently important to make 0-14 and should await trunk reopening. I've downgraded this Jira to Minor.

          Show
          Keith Wall added a comment - I can see from the test output that the test profile was the default java-mms.0-10 and as such Java Broker and Java client are co-located in the same VM. The heuristic used by the test to calculate the number of additional threads that may remain after the test is broken. It is relying on QpidBrokerTestCase#isExternalBroker which is currently always returning true even when broker and client are co-located within the same VM. As a result, the threshold applied is half that that the author intended. This test normally does not fail, so I suspect that you were victim of unlucky timing. I notice that the Virtual Host's housekeeping thread happened to be in progress when the test made the measurement. I think we need to: 1) Fix QpidBrokerTestCase#isExternalBroker and the tests that use it. 2) Consider whether this is still a valuable test as the threading model used by the application is very different since the removal of Mina. I think neither of these changes are sufficiently important to make 0-14 and should await trunk reopening. I've downgraded this Jira to Minor.
          Hide
          Justin Ross added a comment -

          Test output

          Show
          Justin Ross added a comment - Test output

            People

            • Assignee:
              Robbie Gemmell
              Reporter:
              Justin Ross
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development