Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-603

Python testReclaimCredit fails on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • proton-0.7
    • proton-0.8
    • proton-c
    • None
    • Windows

    Description

      Two loops have a set of asserts between them:

          # and none for this new client
          client2 = Messenger("client2")
          client2.blocking = False
          client2.start()
          msg3 = Message()
          msg3.address = self.address + "/msg3"
          client2.put(msg3)
          while client2.work(0):
              self.pump()
          assert self.server.incoming == 1, self.server.incoming  <--
          assert self.server.receiving == 8, self.server.receiving <--
      
          # eventually, credit will rebalance and all links will
          # send a message
          deadline = time() + self.timeout
          while time() < deadline:
              sleep(.1)
              self.pump()
              client2.work(0)
              if self.server.incoming == 3:
                  break;
          assert self.server.incoming == 3, self.server.incoming
          assert self.server.receiving == 6, self.server.receiving
      

      On windows the rebalance starts happening during the while loop at lines 8 and 9, triggering the asserts at line 10 and 11. The proposed fix is to remove the asserts at lines 10 and 11 and fall through to the timed while loop that shows the rebalanced values.

      Attachments

        1. messenger.py.patch
          0.5 kB
          Charles E. Rolke

        Activity

          People

            Unassigned Unassigned
            chug Charles E. Rolke
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: