You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2024/07/26 18:50:03 UTC
(qpid-proton) 02/04: PROTON-2838: Add some failing tests for custom disposition bug
This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
commit f0d31846b1e0e274e5950489d075190bc20421ec
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Thu Jul 25 11:56:34 2024 -0400
PROTON-2838: Add some failing tests for custom disposition bug
---
python/tests/proton_tests/engine.py | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/python/tests/proton_tests/engine.py b/python/tests/proton_tests/engine.py
index 55a39d9c1..1e5f8f476 100644
--- a/python/tests/proton_tests/engine.py
+++ b/python/tests/proton_tests/engine.py
@@ -2319,7 +2319,11 @@ class DeliveryTest(Test):
def tearDown(self):
self.cleanup()
- def testDisposition(self, count=1, tag="tag%i", type=Delivery.ACCEPTED, value=NoValue()):
+ def _testDisposition(self, count=1, tag="tag%i", type=None, value=None):
+ assert type is not None
+ if value is None:
+ value = NoValue()
+
snd, rcv = self.link("test-link")
snd.open()
rcv.open()
@@ -2369,22 +2373,31 @@ class DeliveryTest(Test):
assert d.settled, d.settled
d.settle()
+ def testAccepted(self):
+ self._testDisposition(type=Disposition.ACCEPTED)
+
def testReceived(self):
- self.testDisposition(type=Disposition.RECEIVED, value=ReceivedValue(1, 2))
+ self._testDisposition(type=Disposition.RECEIVED, value=ReceivedValue(1, 2))
def testRejected(self):
- self.testDisposition(type=Disposition.REJECTED, value=RejectValue(Condition(symbol("foo"))))
+ self._testDisposition(type=Disposition.REJECTED, value=RejectValue(Condition(symbol("foo"))))
def testReleased(self):
- self.testDisposition(type=Disposition.RELEASED)
+ self._testDisposition(type=Disposition.RELEASED)
def testModified(self):
- self.testDisposition(type=Disposition.MODIFIED,
- value=ModifiedValue(failed=True, undeliverable=True,
- annotations={"key": "value"}))
+ self._testDisposition(type=Disposition.MODIFIED,
+ value=ModifiedValue(failed=True, undeliverable=True,
+ annotations={"key": "value"}))
def testCustom(self):
- self.testDisposition(type=0x12345, value=CustomValue([1, 2, 3]))
+ self._testDisposition(type=0x12345, value=CustomValue([1, 2, 3]))
+
+ def testEmptyCustom(self):
+ self._testDisposition(type=0x12345)
+
+ def testNullCustom(self):
+ self._testDisposition(type=0x12345, value=CustomValue(None))
class CollectorTest(Test):
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org