[python-qpid] fix for flow control bug

Rafael Schloming rhs at fedoraproject.org
Mon Aug 2 18:06:02 UTC 2010


commit 80647b4667aa0138b11e171d35baa9b36149080b
Author: Rafael H. Schloming <rafaels at redhat.com>
Date:   Mon Aug 2 14:05:40 2010 -0400

    fix for flow control bug

 0001-BZ-597066.patch                               |    4 +-
 ...Fixed-connection.start-hangs-if-connectio.patch |    4 +-
 ...Fixed-qpid-python-high-level-API-clients-.patch |    4 +-
 ...dded-back-values-method-for-backwards-com.patch |    4 +-
 0005-BZ-567249-fix-for-python-2.3.patch            |    4 +-
 ...erformance-tweaks-for-receive-added-confi.patch |    4 +-
 ...817-don-t-always-set-the-sync-bit-on-send.patch |    4 +-
 ...eset-reconnect-delay-after-successful-con.patch |    4 +-
 ...dded-full-support-for-unreliable-at-least.patch |    4 +-
 ...dded-optional-timeouts-to-connection-sess.patch |    4 +-
 ...dded-support-for-x-amqp-0-10.-app-id-cont.patch |    4 +-
 ...ake-sure-we-initialize-properties-even-if.patch |    4 +-
 ...ix-timeout-tests-to-not-leave-queues-lyin.patch |    4 +-
 ...dd-uuid-prefix-to-addresses-beginning-wit.patch |    4 +-
 ...-fix-mangling-for-addresses-that-are-None.patch |    4 +-
 0016-BZ-608807-fixed-concurrent-close.patch        |    4 +-
 ...Z-609258-added-accessor-for-auth_username.patch |    4 +-
 0018-BZ-609258-fixed-auth-username-for-sasl.patch  |    4 +-
 ...Assertion-when-raising-a-link-established.patch |    4 +-
 ...-convert-ttl-from-seconds-to-milliseconds.patch |    4 +-
 ...ixed-payload-of-None-for-text-plain-messa.patch |    4 +-
 0022-removed-old-python-examples.patch             |    4 +-
 ...ixed-missign-import-and-added-test-case-f.patch |    4 +-
 ...liminate-spurious-error-logging-and-recon.patch |    4 +-
 ...ixed-parsing-of-failover-URLs-fixed-drive.patch |    4 +-
 ...Z-614344-default-ports-for-reconnect_urls.patch |    4 +-
 ...ixed-bug-in-flow-control-logic-added-test.patch |  154 ++++++++++++++++++++
 python-qpid.spec                                   |    8 +-
 28 files changed, 211 insertions(+), 55 deletions(-)
---
diff --git a/0001-BZ-597066.patch b/0001-BZ-597066.patch
index fe3ac37..0b94e8b 100644
--- a/0001-BZ-597066.patch
+++ b/0001-BZ-597066.patch
@@ -1,7 +1,7 @@
 From 7f006841387b54cb0165cfa6d1423cd3fae06ce2 Mon Sep 17 00:00:00 2001
 From: Gordon Sim <gsim at apache.org>
 Date: Tue, 1 Jun 2010 09:25:23 +0000
-Subject: [PATCH 01/26] BZ-597066
+Subject: [PATCH 01/27] BZ-597066
 
 Don't use guest/guest default username/password, use None instead (this allows sasl implementation to infer the correct choice while retaining the ability to override it should that be desired)
 
@@ -27,5 +27,5 @@ index 3016543..f5f957c 100644
      self.sasl_mechanisms = options.get("sasl_mechanisms")
      self.sasl_service = options.get("sasl_service", "qpidd")
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0002-Bug-538188-Fixed-connection.start-hangs-if-connectio.patch b/0002-Bug-538188-Fixed-connection.start-hangs-if-connectio.patch
index 2b14650..aaa00d3 100644
--- a/0002-Bug-538188-Fixed-connection.start-hangs-if-connectio.patch
+++ b/0002-Bug-538188-Fixed-connection.start-hangs-if-connectio.patch
@@ -1,7 +1,7 @@
 From 9e7d9497b8665b51075ddcfd1d01d805f009f78b Mon Sep 17 00:00:00 2001
 From: Gordon Sim <gsim at apache.org>
 Date: Wed, 2 Jun 2010 10:24:10 +0000
-Subject: [PATCH 02/26] Bug 538188 - Fixed connection.start() hangs if connection is not accepted
+Subject: [PATCH 02/27] Bug 538188 - Fixed connection.start() hangs if connection is not accepted
 
 QPID-2637: Mark connection as failed if read from socket fails
 
@@ -24,5 +24,5 @@ index 2c61e5a..7dbefb8 100644
        for ssn in self.attached.values():
          if self.close_code[0] != 200:
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0003-Bug-597149-Fixed-qpid-python-high-level-API-clients-.patch b/0003-Bug-597149-Fixed-qpid-python-high-level-API-clients-.patch
index 2db7626..5e739af 100644
--- a/0003-Bug-597149-Fixed-qpid-python-high-level-API-clients-.patch
+++ b/0003-Bug-597149-Fixed-qpid-python-high-level-API-clients-.patch
@@ -1,7 +1,7 @@
 From 4ee966781844a3757eaa44ebf4690105c2f18850 Mon Sep 17 00:00:00 2001
 From: Gordon Sim <gsim at apache.org>
 Date: Wed, 9 Jun 2010 15:37:02 +0000
-Subject: [PATCH 03/26] Bug 597149 - Fixed - qpid python high level API clients not runnable on RHEL4 incompatible with python 2.3.4 OptionParser
+Subject: [PATCH 03/27] Bug 597149 - Fixed - qpid python high level API clients not runnable on RHEL4 incompatible with python 2.3.4 OptionParser
 
 Minor adjustment to option definitions for Python 2.3
 
@@ -78,5 +78,5 @@ index dacebb5..c2dc4db 100755
  parser.add_option("-I", "--id", help="use the supplied id instead of generating one")
  parser.add_option("-S", "--subject", help="specify a subject")
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0004-BZ-567249-added-back-values-method-for-backwards-com.patch b/0004-BZ-567249-added-back-values-method-for-backwards-com.patch
index aaf161b..c1138dd 100644
--- a/0004-BZ-567249-added-back-values-method-for-backwards-com.patch
+++ b/0004-BZ-567249-added-back-values-method-for-backwards-com.patch
@@ -1,7 +1,7 @@
 From 38ce79eee4d48e2be75c6d74ded2c383fba5810c Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Tue, 15 Jun 2010 10:11:39 +0000
-Subject: [PATCH 04/26] BZ-567249 added back values method for backwards compatibility
+Subject: [PATCH 04/27] BZ-567249 added back values method for backwards compatibility
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@954787 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -35,5 +35,5 @@ index acb54ae..8c9f8a0 100644
  class Field:
  
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0005-BZ-567249-fix-for-python-2.3.patch b/0005-BZ-567249-fix-for-python-2.3.patch
index 0fce432..5d6b82b 100644
--- a/0005-BZ-567249-fix-for-python-2.3.patch
+++ b/0005-BZ-567249-fix-for-python-2.3.patch
@@ -1,7 +1,7 @@
 From 4e05457ddfe178ac4cfa55bb1dcd6986c272e500 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Tue, 15 Jun 2010 14:13:15 +0000
-Subject: [PATCH 05/26] BZ-567249 fix for python 2.3
+Subject: [PATCH 05/27] BZ-567249 fix for python 2.3
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@954901 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -27,5 +27,5 @@ index 8c9f8a0..390552b 100644
  class Field:
  
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0006-BZ-596677-performance-tweaks-for-receive-added-confi.patch b/0006-BZ-596677-performance-tweaks-for-receive-added-confi.patch
index abe50c3..abc742d 100644
--- a/0006-BZ-596677-performance-tweaks-for-receive-added-confi.patch
+++ b/0006-BZ-596677-performance-tweaks-for-receive-added-confi.patch
@@ -1,7 +1,7 @@
 From b0ae853c18fad859d5e7daabcb0598ab2d197ea6 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Wed, 16 Jun 2010 16:47:18 +0000
-Subject: [PATCH 06/26] BZ-596677 performance tweaks for receive: added configurable threshold for issuing credit; don't disable byte credit more than necessary; avoided n-squared loop for generating acks
+Subject: [PATCH 06/27] BZ-596677 performance tweaks for receive: added configurable threshold for issuing credit; don't disable byte credit more than necessary; avoided n-squared loop for generating acks
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@955296 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -132,5 +132,5 @@ index f5f957c..707aee3 100644
  
    def _grant(self):
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0007-BZ-574817-don-t-always-set-the-sync-bit-on-send.patch b/0007-BZ-574817-don-t-always-set-the-sync-bit-on-send.patch
index 1813161..43b0f6d 100644
--- a/0007-BZ-574817-don-t-always-set-the-sync-bit-on-send.patch
+++ b/0007-BZ-574817-don-t-always-set-the-sync-bit-on-send.patch
@@ -1,7 +1,7 @@
 From e1c3a645453c2796b67625a1e00341894777f223 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Wed, 16 Jun 2010 22:15:14 +0000
-Subject: [PATCH 07/26] BZ-574817 don't always set the sync bit on send
+Subject: [PATCH 07/27] BZ-574817 don't always set the sync bit on send
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@955414 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -132,5 +132,5 @@ index 707aee3..58a654e 100644
  
    @synchronized
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0008-BZ-604836-reset-reconnect-delay-after-successful-con.patch b/0008-BZ-604836-reset-reconnect-delay-after-successful-con.patch
index 19cac4c..6136d47 100644
--- a/0008-BZ-604836-reset-reconnect-delay-after-successful-con.patch
+++ b/0008-BZ-604836-reset-reconnect-delay-after-successful-con.patch
@@ -1,7 +1,7 @@
 From df73fc4c6a53f8b266fb88af60ea68df03057668 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Thu, 17 Jun 2010 02:18:24 +0000
-Subject: [PATCH 08/26] BZ-604836 reset reconnect delay after successful connect
+Subject: [PATCH 08/27] BZ-604836 reset reconnect delay after successful connect
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@955462 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -21,5 +21,5 @@ index a6170c0..7f04903 100644
      except socket.error, e:
        self._host = (self._host + 1) % len(self._hosts)
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0009-BZ-560707-added-full-support-for-unreliable-at-least.patch b/0009-BZ-560707-added-full-support-for-unreliable-at-least.patch
index ddf54f2..e2270d7 100644
--- a/0009-BZ-560707-added-full-support-for-unreliable-at-least.patch
+++ b/0009-BZ-560707-added-full-support-for-unreliable-at-least.patch
@@ -1,7 +1,7 @@
 From 3f3e6086766770c3d7e1a7cf9afdfaedce82dd18 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Thu, 24 Jun 2010 17:34:34 +0000
-Subject: [PATCH 09/26] BZ-560707 added full support for unreliable, at-least-once, and at-most-once reliability options
+Subject: [PATCH 09/27] BZ-560707 added full support for unreliable, at-least-once, and at-most-once reliability options
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@957644 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -201,5 +201,5 @@ index 3133fe7..dce8d9b 100644
  
    def setup_connection(self):
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0010-BZ-569515-added-optional-timeouts-to-connection-sess.patch b/0010-BZ-569515-added-optional-timeouts-to-connection-sess.patch
index 6939e33..228d9dd 100644
--- a/0010-BZ-569515-added-optional-timeouts-to-connection-sess.patch
+++ b/0010-BZ-569515-added-optional-timeouts-to-connection-sess.patch
@@ -1,7 +1,7 @@
 From 495213b8cc66dc00c15662c559a48dcf04516fd7 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Fri, 25 Jun 2010 17:09:05 +0000
-Subject: [PATCH 10/26] BZ-569515 added optional timeouts to {connection,session,sender,receiver}.close() as well as connection.detach() and {session,sender}.sync()
+Subject: [PATCH 10/27] BZ-569515 added optional timeouts to {connection,session,sender,receiver}.close() as well as connection.detach() and {session,sender}.sync()
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@958037 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -329,5 +329,5 @@ index dce8d9b..b064d62 100644
  ACK_QD = 'test-ack-queue; {delete: always}'
  
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0011-BZ-608118-added-support-for-x-amqp-0-10.-app-id-cont.patch b/0011-BZ-608118-added-support-for-x-amqp-0-10.-app-id-cont.patch
index d4f5fb2..9e51781 100644
--- a/0011-BZ-608118-added-support-for-x-amqp-0-10.-app-id-cont.patch
+++ b/0011-BZ-608118-added-support-for-x-amqp-0-10.-app-id-cont.patch
@@ -1,7 +1,7 @@
 From 9201b99100d8d47b3ed92573eea0e71969996418 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Fri, 25 Jun 2010 18:12:28 +0000
-Subject: [PATCH 11/26] BZ-608118 added support for x-amqp-0-10.{app-id,content-encoding,routing-key}
+Subject: [PATCH 11/27] BZ-608118 added support for x-amqp-0-10.{app-id,content-encoding,routing-key}
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@958055 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -98,5 +98,5 @@ index 2ca1fbf..91aab5f 100644
    def testMapContent(self):
      self.check(Message(MessageEchoTests.TEST_MAP))
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0012-BZ-608118-make-sure-we-initialize-properties-even-if.patch b/0012-BZ-608118-make-sure-we-initialize-properties-even-if.patch
index 400fe84..3086847 100644
--- a/0012-BZ-608118-make-sure-we-initialize-properties-even-if.patch
+++ b/0012-BZ-608118-make-sure-we-initialize-properties-even-if.patch
@@ -1,7 +1,7 @@
 From d5086ed9cd510ce9f1dc80da90315518d5c3ebd2 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Fri, 25 Jun 2010 18:26:14 +0000
-Subject: [PATCH 12/26] BZ-608118 make sure we initialize properties even if application_headers is None
+Subject: [PATCH 12/27] BZ-608118 make sure we initialize properties even if application_headers is None
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@958060 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -22,5 +22,5 @@ index ed6b602..a732a60 100644
        msg.properties["x-amqp-0-10.app-id"] = mp.app_id
      if mp.content_encoding is not None:
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0013-BZ-569515-fix-timeout-tests-to-not-leave-queues-lyin.patch b/0013-BZ-569515-fix-timeout-tests-to-not-leave-queues-lyin.patch
index 8b12666..1c1ee22 100644
--- a/0013-BZ-569515-fix-timeout-tests-to-not-leave-queues-lyin.patch
+++ b/0013-BZ-569515-fix-timeout-tests-to-not-leave-queues-lyin.patch
@@ -1,7 +1,7 @@
 From ee19a4688911a9fc55dea5f3176e99d6b77acafe Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Fri, 25 Jun 2010 18:57:59 +0000
-Subject: [PATCH 13/26] BZ-569515 fix timeout tests to not leave queues lying around
+Subject: [PATCH 13/27] BZ-569515 fix timeout tests to not leave queues lying around
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@958077 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -22,5 +22,5 @@ index b064d62..c01f16e 100644
    def teardown_connection(self, conn):
      try:
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0014-BZ-607798-add-uuid-prefix-to-addresses-beginning-wit.patch b/0014-BZ-607798-add-uuid-prefix-to-addresses-beginning-wit.patch
index e02ea4f..92d54dc 100644
--- a/0014-BZ-607798-add-uuid-prefix-to-addresses-beginning-wit.patch
+++ b/0014-BZ-607798-add-uuid-prefix-to-addresses-beginning-wit.patch
@@ -1,7 +1,7 @@
 From 1834e02e7dd0abd92d4bee09818f86f4fb6af89b Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Fri, 25 Jun 2010 19:06:05 +0000
-Subject: [PATCH 14/26] BZ-607798 add uuid prefix to addresses beginning with hash(#)
+Subject: [PATCH 14/27] BZ-607798 add uuid prefix to addresses beginning with hash(#)
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@958083 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -42,5 +42,5 @@ index 30f51fe..8bddc96 100644
  
    """
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0015-BZ-607798-fix-mangling-for-addresses-that-are-None.patch b/0015-BZ-607798-fix-mangling-for-addresses-that-are-None.patch
index fbf60fc..2062233 100644
--- a/0015-BZ-607798-fix-mangling-for-addresses-that-are-None.patch
+++ b/0015-BZ-607798-fix-mangling-for-addresses-that-are-None.patch
@@ -1,7 +1,7 @@
 From dcc6c20a11f1dffac6708a128517757e7b1e0324 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Mon, 28 Jun 2010 11:35:59 +0000
-Subject: [PATCH 15/26] BZ-607798 fix mangling for addresses that are None
+Subject: [PATCH 15/27] BZ-607798 fix mangling for addresses that are None
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@958547 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -22,5 +22,5 @@ index 8bddc96..62423ca 100644
    else:
      return addr
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0016-BZ-608807-fixed-concurrent-close.patch b/0016-BZ-608807-fixed-concurrent-close.patch
index b340a1d..8bc755b 100644
--- a/0016-BZ-608807-fixed-concurrent-close.patch
+++ b/0016-BZ-608807-fixed-concurrent-close.patch
@@ -1,7 +1,7 @@
 From 62d79016f13c729abccba7a84d1dbb33ec94d9d5 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Wed, 30 Jun 2010 12:44:58 +0000
-Subject: [PATCH 16/26] BZ-608807 fixed concurrent close
+Subject: [PATCH 16/27] BZ-608807 fixed concurrent close
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@959289 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -468,5 +468,5 @@ index c01f16e..52ca9f3 100644
      content = self.send("testCapacityIncrease")
      self.sleep()
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0017-BZ-609258-added-accessor-for-auth_username.patch b/0017-BZ-609258-added-accessor-for-auth_username.patch
index 74106c9..7302654 100644
--- a/0017-BZ-609258-added-accessor-for-auth_username.patch
+++ b/0017-BZ-609258-added-accessor-for-auth_username.patch
@@ -1,7 +1,7 @@
 From d31918432748c8e6f3596548796fb45bf778b20e Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Wed, 30 Jun 2010 14:25:03 +0000
-Subject: [PATCH 17/26] BZ-609258 added accessor for auth_username
+Subject: [PATCH 17/27] BZ-609258 added accessor for auth_username
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@959326 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -59,5 +59,5 @@ index 6b00dda..6645903 100644
    from saslwrapper import Client as _Client
    Client = WrapperClient
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0018-BZ-609258-fixed-auth-username-for-sasl.patch b/0018-BZ-609258-fixed-auth-username-for-sasl.patch
index ea5df88..0f342be 100644
--- a/0018-BZ-609258-fixed-auth-username-for-sasl.patch
+++ b/0018-BZ-609258-fixed-auth-username-for-sasl.patch
@@ -1,7 +1,7 @@
 From 5c3a50f97f327161fd5bd991c8ef4a8b6aece62a Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Wed, 30 Jun 2010 14:36:43 +0000
-Subject: [PATCH 18/26] BZ-609258 fixed auth username for sasl
+Subject: [PATCH 18/27] BZ-609258 fixed auth username for sasl
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@959333 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -26,5 +26,5 @@ index 6645903..d4c15bd 100644
  class PlainClient:
  
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0019-Bug-611543-Assertion-when-raising-a-link-established.patch b/0019-Bug-611543-Assertion-when-raising-a-link-established.patch
index 074246f..059e06f 100644
--- a/0019-Bug-611543-Assertion-when-raising-a-link-established.patch
+++ b/0019-Bug-611543-Assertion-when-raising-a-link-established.patch
@@ -1,7 +1,7 @@
 From ba83c5fd4c4cccae42240c70473d8d37fd8d3fcb Mon Sep 17 00:00:00 2001
 From: Alan Conway <aconway at apache.org>
 Date: Mon, 5 Jul 2010 20:12:08 +0000
-Subject: [PATCH 19/26] Bug 611543  - Assertion when raising a link established event on clustered broker
+Subject: [PATCH 19/27] Bug 611543  - Assertion when raising a link established event on clustered broker
 
 Defer delivery of messages in cluster-unsafe context.
 
@@ -55,5 +55,5 @@ index 2242dcb..fddeefa 100644
      def ready(self):
          """Wait till broker is ready to serve clients"""
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0020-BZ-612615-convert-ttl-from-seconds-to-milliseconds.patch b/0020-BZ-612615-convert-ttl-from-seconds-to-milliseconds.patch
index cdb79d4..19eb3ba 100644
--- a/0020-BZ-612615-convert-ttl-from-seconds-to-milliseconds.patch
+++ b/0020-BZ-612615-convert-ttl-from-seconds-to-milliseconds.patch
@@ -1,7 +1,7 @@
 From a0e4c21893973aea53b773381ee6ca2c7e6dbcb2 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Thu, 8 Jul 2010 15:53:49 +0000
-Subject: [PATCH 20/26] BZ-612615 convert ttl from seconds to milliseconds
+Subject: [PATCH 20/27] BZ-612615 convert ttl from seconds to milliseconds
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@961824 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -70,5 +70,5 @@ index a96a6da..e2406f1 100644
    @ivar properties: application specific message properties
    @type content_type: str
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0021-BZ-613216-fixed-payload-of-None-for-text-plain-messa.patch b/0021-BZ-613216-fixed-payload-of-None-for-text-plain-messa.patch
index df4e825..fc26882 100644
--- a/0021-BZ-613216-fixed-payload-of-None-for-text-plain-messa.patch
+++ b/0021-BZ-613216-fixed-payload-of-None-for-text-plain-messa.patch
@@ -1,7 +1,7 @@
 From ee2dcac6734efed72b2379cf22437799e8f39efc Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Mon, 12 Jul 2010 13:43:27 +0000
-Subject: [PATCH 21/26] BZ-613216 fixed payload of None for text/plain messages
+Subject: [PATCH 21/27] BZ-613216 fixed payload of None for text/plain messages
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@963280 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -54,5 +54,5 @@ index 91aab5f..526a5cf 100644
 +  def testTextPlainEmpty(self):
 +    self.check(Message(content_type="text/plain"))
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0022-removed-old-python-examples.patch b/0022-removed-old-python-examples.patch
index 81e1da0..fc93210 100644
--- a/0022-removed-old-python-examples.patch
+++ b/0022-removed-old-python-examples.patch
@@ -1,7 +1,7 @@
 From 3d0eebd14b24321d5c91662c873c1b689c360150 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Tue, 13 Jul 2010 16:33:24 +0000
-Subject: [PATCH 22/26] removed old python examples
+Subject: [PATCH 22/27] removed old python examples
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@963786 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -3133,5 +3133,5 @@ index fa97cab..0000000
 -
 -session.close()
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0023-BZ-613912-fixed-missign-import-and-added-test-case-f.patch b/0023-BZ-613912-fixed-missign-import-and-added-test-case-f.patch
index b0d2a9c..8d147c2 100644
--- a/0023-BZ-613912-fixed-missign-import-and-added-test-case-f.patch
+++ b/0023-BZ-613912-fixed-missign-import-and-added-test-case-f.patch
@@ -1,7 +1,7 @@
 From dee1c0cebff68b694ed6e80be79b8943ebb40574 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Tue, 13 Jul 2010 17:58:44 +0000
-Subject: [PATCH 23/26] BZ-613912 fixed missign import and added test case for reconnect_urls
+Subject: [PATCH 23/27] BZ-613912 fixed missign import and added test case for reconnect_urls
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@963803 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -74,5 +74,5 @@ index 3409d77..e62bebd 100644
    def __repr__(self):
      return "URL(%r)" % str(self)
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0024-BZ-614054-eliminate-spurious-error-logging-and-recon.patch b/0024-BZ-614054-eliminate-spurious-error-logging-and-recon.patch
index 5a97a7e..6ec560d 100644
--- a/0024-BZ-614054-eliminate-spurious-error-logging-and-recon.patch
+++ b/0024-BZ-614054-eliminate-spurious-error-logging-and-recon.patch
@@ -1,7 +1,7 @@
 From 69472698c9455b198d70e7b61ae2f1f06a8ff783 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Tue, 13 Jul 2010 19:07:22 +0000
-Subject: [PATCH 24/26] BZ-614054 eliminate spurious error logging and reconnect attempts
+Subject: [PATCH 24/27] BZ-614054 eliminate spurious error logging and reconnect attempts
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@963825 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -47,5 +47,5 @@ index 42bc280..44833f7 100644
        ssn.acknowledge(msg, sync=False)
  
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0025-BZ-614054-fixed-parsing-of-failover-URLs-fixed-drive.patch b/0025-BZ-614054-fixed-parsing-of-failover-URLs-fixed-drive.patch
index 12055f4..c826b31 100644
--- a/0025-BZ-614054-fixed-parsing-of-failover-URLs-fixed-drive.patch
+++ b/0025-BZ-614054-fixed-parsing-of-failover-URLs-fixed-drive.patch
@@ -1,7 +1,7 @@
 From 5387d39d66787509b3d687be7247dcf8a2d4b207 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Wed, 14 Jul 2010 13:36:03 +0000
-Subject: [PATCH 25/26] BZ-614054 fixed parsing of failover URLs; fixed driver to notice when reconnect_urls is dynamically changed
+Subject: [PATCH 25/27] BZ-614054 fixed parsing of failover URLs; fixed driver to notice when reconnect_urls is dynamically changed
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@964044 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -94,5 +94,5 @@ index 44833f7..265cf7d 100644
    log.warn("set reconnect_urls for conn %s: %s", conn, reconnect_urls)
  
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0026-BZ-614344-default-ports-for-reconnect_urls.patch b/0026-BZ-614344-default-ports-for-reconnect_urls.patch
index a9f6ec9..b81737f 100644
--- a/0026-BZ-614344-default-ports-for-reconnect_urls.patch
+++ b/0026-BZ-614344-default-ports-for-reconnect_urls.patch
@@ -1,7 +1,7 @@
 From 0e2870b1d18706721055ddf73fc4e7a6b84cf674 Mon Sep 17 00:00:00 2001
 From: Rafael H. Schloming <rhs at apache.org>
 Date: Wed, 14 Jul 2010 19:47:37 +0000
-Subject: [PATCH 26/26] BZ-614344 default ports for reconnect_urls
+Subject: [PATCH 26/27] BZ-614344 default ports for reconnect_urls
 
 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@964151 13f79535-47bb-0310-9956-ffa450edef68
 ---
@@ -33,5 +33,5 @@ index 1e1055a..9b34a46 100644
        self._host = 0
      result = hosts[self._host]
 -- 
-1.7.1.1
+1.7.2
 
diff --git a/0027-BZ-620402-fixed-bug-in-flow-control-logic-added-test.patch b/0027-BZ-620402-fixed-bug-in-flow-control-logic-added-test.patch
new file mode 100644
index 0000000..cea7449
--- /dev/null
+++ b/0027-BZ-620402-fixed-bug-in-flow-control-logic-added-test.patch
@@ -0,0 +1,154 @@
+From 98d60f067c05a308f82b23fcdfa87494d783daa1 Mon Sep 17 00:00:00 2001
+From: Rafael H. Schloming <rhs at apache.org>
+Date: Mon, 2 Aug 2010 12:10:52 +0000
+Subject: [PATCH 27/27] BZ-620402 fixed bug in flow control logic; added tests
+
+git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@981474 13f79535-47bb-0310-9956-ffa450edef68
+---
+ qpid/python/qpid/messaging/endpoints.py       |    7 ++--
+ qpid/python/qpid/tests/messaging/__init__.py  |   19 +++++++++-
+ qpid/python/qpid/tests/messaging/endpoints.py |   46 +++++++++++++++++++-----
+ 3 files changed, 57 insertions(+), 15 deletions(-)
+
+diff --git a/qpid/python/qpid/messaging/endpoints.py b/qpid/python/qpid/messaging/endpoints.py
+index f989d6c..7d7d424 100644
+--- a/qpid/python/qpid/messaging/endpoints.py
++++ b/qpid/python/qpid/messaging/endpoints.py
+@@ -1009,8 +1009,9 @@ class Receiver(Endpoint, object):
+       if msg is None:
+         raise Empty()
+     elif self._capacity not in (0, UNLIMITED.value):
+-      if self.received - self.returned <= int(ceil(self.threshold * self._capacity)):
+-        self.granted = self.received + self._capacity
++      t = int(ceil(self.threshold * self._capacity))
++      if self.received - self.returned <= t:
++        self.granted = self.returned + self._capacity
+         self._wakeup()
+     return msg
+ 
+@@ -1018,7 +1019,7 @@ class Receiver(Endpoint, object):
+     if self._capacity == UNLIMITED.value:
+       self.granted = UNLIMITED
+     else:
+-      self.granted = self.received + self._capacity
++      self.granted = self.returned + self._capacity
+ 
+   @synchronized
+   def close(self, timeout=None):
+diff --git a/qpid/python/qpid/tests/messaging/__init__.py b/qpid/python/qpid/tests/messaging/__init__.py
+index a160f38..ddacf77 100644
+--- a/qpid/python/qpid/tests/messaging/__init__.py
++++ b/qpid/python/qpid/tests/messaging/__init__.py
+@@ -18,6 +18,7 @@
+ #
+ 
+ import time
++from math import ceil
+ from qpid.harness import Skipped
+ from qpid.messaging import *
+ from qpid.tests import Test
+@@ -134,9 +135,23 @@ class Base(Test):
+     contents = self.drain(rcv)
+     assert len(contents) == 0, "%s is supposed to be empty: %s" % (rcv, contents)
+ 
+-  def assertAvailable(self, rcv, expected):
++  def assertAvailable(self, rcv, expected=None, lower=None, upper=None):
++    if expected is not None:
++      if lower is not None or upper is not None:
++        raise ValueError("cannot specify lower or upper when specifying expected")
++      lower = expected
++      upper = expected
++    else:
++      if lower is None:
++        lower = int(ceil(rcv.threshold*rcv.capacity))
++      if upper is None:
++        upper = rcv.capacity
++
+     p = rcv.available()
+-    assert p == expected, "expected %s, got %s" % (expected, p)
++    if upper == lower:
++      assert p == lower, "expected %s, got %s" % (lower, p)
++    else:
++      assert lower <= p <= upper, "expected %s to be in range [%s, %s]" % (p, lower, upper)
+ 
+   def sleep(self):
+     time.sleep(self.delay())
+diff --git a/qpid/python/qpid/tests/messaging/endpoints.py b/qpid/python/qpid/tests/messaging/endpoints.py
+index bc17068..b360482 100644
+--- a/qpid/python/qpid/tests/messaging/endpoints.py
++++ b/qpid/python/qpid/tests/messaging/endpoints.py
+@@ -659,9 +659,9 @@ class ReceiverTests(Base):
+   def setup_receiver(self):
+     return self.ssn.receiver(RECEIVER_Q)
+ 
+-  def send(self, base, count = None):
++  def send(self, base, count = None, sync=True):
+     content = self.content(base, count)
+-    self.snd.send(content)
++    self.snd.send(content, sync=sync)
+     return content
+ 
+   def testFetch(self):
+@@ -762,25 +762,51 @@ class ReceiverTests(Base):
+ 
+     self.ssn.acknowledge()
+ 
+-  def testCapacity(self):
+-    self.rcv.capacity = 5
++  def capacityTest(self, capacity, threshold=None):
++    if threshold is not None:
++      self.rcv.threshold = threshold
++    self.rcv.capacity = capacity
+     self.assertAvailable(self.rcv, 0)
+ 
+-    for i in range(15):
+-      self.send("testCapacity", i)
++    for i in range(2*capacity):
++      self.send("capacityTest(%s, %s)" % (capacity, threshold), i, sync=False)
++    self.snd.sync()
+     self.sleep()
+-    self.assertAvailable(self.rcv, 5)
++    self.assertAvailable(self.rcv)
+ 
+-    self.drain(self.rcv, limit = 5)
++    first = capacity/2
++    second = capacity - first
++    self.drain(self.rcv, limit = first)
++    self.sleep()
++    self.assertAvailable(self.rcv)
++    self.drain(self.rcv, limit = second)
+     self.sleep()
+-    self.assertAvailable(self.rcv, 5)
++    self.assertAvailable(self.rcv)
+ 
+     drained = self.drain(self.rcv)
+-    assert len(drained) == 10, "%s, %s" % (len(drained), drained)
++    assert len(drained) == capacity, "%s, %s" % (len(drained), drained)
+     self.assertAvailable(self.rcv, 0)
+ 
+     self.ssn.acknowledge()
+ 
++  def testCapacity5(self):
++    self.capacityTest(5)
++
++  def testCapacity5Threshold1(self):
++    self.capacityTest(5, 1)
++
++  def testCapacity10(self):
++    self.capacityTest(10)
++
++  def testCapacity10Threshold1(self):
++    self.capacityTest(10, 1)
++
++  def testCapacity100(self):
++    self.capacityTest(100)
++
++  def testCapacity100Threshold1(self):
++    self.capacityTest(100, 1)
++
+   def testCapacityUNLIMITED(self):
+     self.rcv.capacity = UNLIMITED
+     self.assertAvailable(self.rcv, 0)
+-- 
+1.7.2
+
diff --git a/python-qpid.spec b/python-qpid.spec
index b4811d9..d98c48b 100644
--- a/python-qpid.spec
+++ b/python-qpid.spec
@@ -3,7 +3,7 @@
 
 Name:           python-qpid
 Version:        0.7.946106
-Release:        10%{?dist}
+Release:        11%{?dist}
 Summary:        Python client library for AMQP
 
 Group:          Development/Python
@@ -39,6 +39,7 @@ Patch22:        0023-BZ-613912-fixed-missign-import-and-added-test-case-f.patch
 Patch23:        0024-BZ-614054-eliminate-spurious-error-logging-and-recon.patch
 Patch24:        0025-BZ-614054-fixed-parsing-of-failover-URLs-fixed-drive.patch
 Patch25:        0026-BZ-614344-default-ports-for-reconnect_urls.patch
+Patch26:        0027-BZ-620402-fixed-bug-in-flow-control-logic-added-test.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
@@ -76,6 +77,7 @@ The Apache Qpid Python client library for AMQP.
 %patch23 -p3
 %patch24 -p3
 %patch25 -p3
+%patch26 -p3
 
 %build
 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
@@ -99,8 +101,8 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %changelog
-* Thu Jul 22 2010 David Malcolm <dmalcolm at redhat.com> - 0.7.946106-10
-- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
+* Mon Aug  2 2010 Rafael Schloming <rafaels at redhat.com> - 0.7.946106-11
+- Fix for bz620402
 
 * Wed Jul 14 2010 Rafael Schloming <rafaels at redhat.com> - 0.7.946106-9
 - Fix for bz614344


More information about the scm-commits mailing list