Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-4303

FailoverTest sometimes fails on slower CI boxes.

    Details

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

      Description

      As shown by:

      https://builds.apache.org/view/M-R/view/Qpid/job/Qpid-Java-Java-BDB-TestMatrix/lastCompletedBuild/jdk=JDK%201.6%20%28latest%29,label=Ubuntu,profile=java-bdb.0-9-1/testReport/org.apache.qpid.test.client.failover/FailoverTest/testP2PFailoverTransacted/

      Regression

      org.apache.qpid.test.client.failover.FailoverTest.testP2PFailoverTransacted
      Failing for the past 1 build (Since Failed#521 )
      Took 5.5 sec.
      add description
      Error Message

      Message 1 was null!

      Stacktrace

      junit.framework.AssertionFailedError: Message 1 was null!
      at org.apache.qpid.test.client.failover.FailoverTest.consumeMessages(FailoverTest.java:111)
      at org.apache.qpid.test.client.failover.FailoverTest.runP2PFailover(FailoverTest.java:216)
      at org.apache.qpid.test.client.failover.FailoverTest.testP2PFailover(FailoverTest.java:187)
      at org.apache.qpid.test.client.failover.FailoverTest.testP2PFailoverTransacted(FailoverTest.java:172)
      at org.apache.qpid.test.utils.QpidBrokerTestCase.runBare(QpidBrokerTestCase.java:244)
      at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:137)

        Activity

        Hide
        gemmellr Robbie Gemmell added a comment -

        Changes look good to me.

        Show
        gemmellr Robbie Gemmell added a comment - Changes look good to me.
        Hide
        k-wall Keith Wall added a comment -

        Robbie, could you review please?

        Show
        k-wall Keith Wall added a comment - Robbie, could you review please?
        Hide
        k-wall Keith Wall added a comment - - edited

        Patch applied. I altered testP2PFailoverTransacted to that it runs transacted as I think this was the author's intent. Tests pass all Java and the 'cpp' profile.

        I left testP2PFailoverTransactedWithMessagesLeftToConsumeAndProduce non-transacted owning to the comment "Currently the cluster does not support transactions that span a failover" and the fact that I have no way to run the clustered cpp tests.

        Show
        k-wall Keith Wall added a comment - - edited Patch applied. I altered testP2PFailoverTransacted to that it runs transacted as I think this was the author's intent. Tests pass all Java and the 'cpp' profile. I left testP2PFailoverTransactedWithMessagesLeftToConsumeAndProduce non-transacted owning to the comment "Currently the cluster does not support transactions that span a failover" and the fact that I have no way to run the clustered cpp tests.
        Hide
        k-wall Keith Wall added a comment -

        Firstly, the test name says "transacted" when in fact the test actually uses a non-transactional session, so tests testP2PFailoverTransacted and testP2PFailover are currently equal.

        Looking at the failed run (log attached), you can see that none of the sent messages had reached the broker by the time the consumer had started. For this reason, the receive returned null. In the non-transactional case, the test needs to #sync in order to ensure that its messages have reached the broker in order for reliable operation.

        Show
        k-wall Keith Wall added a comment - Firstly, the test name says "transacted" when in fact the test actually uses a non-transactional session, so tests testP2PFailoverTransacted and testP2PFailover are currently equal. Looking at the failed run (log attached), you can see that none of the sent messages had reached the broker by the time the consumer had started. For this reason, the receive returned null. In the non-transactional case, the test needs to #sync in order to ensure that its messages have reached the broker in order for reliable operation.

          People

          • Assignee:
            gemmellr Robbie Gemmell
            Reporter:
            k-wall Keith Wall
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development