Qpid
  1. Qpid
  2. QPID-4099

FailoverBehaviourTest.testFlowControlFlagResetOnFailover fails occasionally on CI

    Details

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

      Description

      Test FailoverBehaviourTest.testFlowControlFlagResetOnFailover has been seen to fail on Apache CI.

      https://builds.apache.org/view/M-R/view/Qpid/job/Qpid-Java-Java-MMS-TestMatrix/jdk=JDK%201.6%20%28latest%29,label=Ubuntu,profile=java-mms.0-9-1/405/testReport/junit/org.apache.qpid.client.failover/FailoverBehaviourTest/testFlowControlFlagResetOnFailover/

      org.apache.qpid.client.failover.FailoverBehaviourTest.testFlowControlFlagResetOnFailover
      Failing for the past 1 build (Since Failed#405 )
      Took 13 sec.
      Error Message
      
      Unexpected number of sent messages expected:<4> but was:<3>
      
      Stacktrace
      
      junit.framework.AssertionFailedError: Unexpected number of sent messages expected:<4> but was:<3>
      	at org.apache.qpid.client.failover.FailoverBehaviourTest.testFlowControlFlagResetOnFailover(FailoverBehaviourTest.java:897)
      	at org.apache.qpid.test.utils.QpidBrokerTestCase.runBare(QpidBrokerTestCase.java:243)
      	at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:137)
      

        Activity

        Hide
        Keith Wall added a comment -

        Looking at the test log file, you can see this is a race condition within the test itself.

        The client main thread continues as soon as ChannelFlow(active=false) is received from the Broker. This may be before the producing thread has returned control to the loop (after the 4th commit) and had chance to increment the counter.

        Show
        Keith Wall added a comment - Looking at the test log file, you can see this is a race condition within the test itself. The client main thread continues as soon as ChannelFlow(active=false) is received from the Broker. This may be before the producing thread has returned control to the loop (after the 4th commit) and had chance to increment the counter.
        Hide
        Keith Wall added a comment -

        Hi Robbie, can you look over this commit please?

        Show
        Keith Wall added a comment - Hi Robbie, can you look over this commit please?
        Hide
        Robbie Gemmell added a comment -

        Looks ok to me.

        Show
        Robbie Gemmell added a comment - Looks ok to me.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development