Qpid
  1. Qpid
  2. QPID-3635

AMQQConnectionTest incorrect assumes an order in which the tests are run

    Details

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

      Description

      The AMQConnection test class makes assumptions about the order in which tests are run and is generally just horribly ill-conceived.

      For example the test testTopicSessionCreateBrowser() depends upon the initialisation of the member variable _topicSession which is initialised in the test testCreateTopicSession(), and is only still valid since though the test creates new connections in every setUp, it does not tear them down at the end of each test.

      Note also that if the creation of _topicSession and _queueSession are moved to setUp then the test testGetChannelID() will fail as it depends on no prior sessions existing and also on a defined policy of assigning channel numbers to sessions (really this test makes no sense at all).

        Activity

        Hide
        Keith Wall added a comment -

        Patch applied to generally make these test case more sane:

        1) testPrefetchSystemProperty to PrefetchBehaviourTest for better division of responsibilities between tests.
        2) Split AMQConnectionTest into QueueSessionFactoryTest and TopicSessionFactoryTest.
        3) Removed AMQSSLConnectionTest as there is nothing transport specific and therefore added nothing not already tested by SSLTest.

        Show
        Keith Wall added a comment - Patch applied to generally make these test case more sane: 1) testPrefetchSystemProperty to PrefetchBehaviourTest for better division of responsibilities between tests. 2) Split AMQConnectionTest into QueueSessionFactoryTest and TopicSessionFactoryTest. 3) Removed AMQSSLConnectionTest as there is nothing transport specific and therefore added nothing not already tested by SSLTest.
        Hide
        Keith Wall added a comment -

        Rob's patch for QPID-3714 addressed the immediate problem of this test. This patch hopefully addresses the wider ill-conceived nature of the test.

        Show
        Keith Wall added a comment - Rob's patch for QPID-3714 addressed the immediate problem of this test. This patch hopefully addresses the wider ill-conceived nature of the test.
        Hide
        Robbie Gemmell added a comment -

        Changes look good to me.

        Show
        Robbie Gemmell added a comment - Changes look good to me.

          People

          • Assignee:
            Robbie Gemmell
            Reporter:
            Rob Godfrey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development