Skip to content

Commit 68eb572

Browse files
authored
Revert "Commented out two tests in system_tests_two_routers.py until disposit… (#1754)" (#1759)
This reverts commit ee52aef.
1 parent 9edda73 commit 68eb572

File tree

1 file changed

+39
-41
lines changed

1 file changed

+39
-41
lines changed

tests/system_tests_two_routers.py

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import json
2121
import os
2222
import logging
23-
#from time import sleep
23+
from time import sleep
2424
from threading import Timer
2525
from subprocess import PIPE, STDOUT
2626

@@ -1765,46 +1765,44 @@ def router(name, extra_config):
17651765
cls.RouterA.wait_router_connected('RouterB')
17661766
cls.RouterB.wait_router_connected('RouterA')
17671767

1768-
# The following two tests are commented out temporarily until the proton disposition
1769-
# issue involving extension state is fixed on proton main
1770-
#def test_02_closest(self):
1771-
# """
1772-
# Verify non-terminal state and data propagates over anycase
1773-
# """
1774-
# test = ExtensionStateTester(self.RouterA.addresses[0],
1775-
# self.RouterB.addresses[0],
1776-
# "closest/fleabag")
1777-
# test.run()
1778-
# self.assertIsNone(test.error)
1779-
1780-
#def test_03_multicast(self):
1781-
# """
1782-
# Verify that disposition state set by the publisher is available to all
1783-
# consumers
1784-
# """
1785-
# rxs = [MyExtendedReceiver(self.RouterA.addresses[0],
1786-
# "multicast/thingy")
1787-
# for x in range(3)]
1788-
# self.RouterA.wait_address("multicast/thingy", subscribers=3)
1789-
# sleep(0.5) # let subscribers grant credit
1790-
# tx = MyExtendedSender(self.RouterB.addresses[0],
1791-
# "multicast/thingy")
1792-
# tx.wait()
1793-
1794-
# # DISPATCH-1705: only one of the receivers gets the data, but all
1795-
# # should get the state
1796-
1797-
# ext_data = None
1798-
# for rx in rxs:
1799-
# rx.stop()
1800-
# try:
1801-
# while True:
1802-
# dispo = rx.remote_states.pop()
1803-
# self.assertEqual(999, dispo[0])
1804-
# ext_data = dispo[1] or ext_data
1805-
# except IndexError:
1806-
# pass
1807-
# self.assertEqual([1, 2, 3], ext_data)
1768+
def test_02_closest(self):
1769+
"""
1770+
Verify non-terminal state and data propagates over anycase
1771+
"""
1772+
test = ExtensionStateTester(self.RouterA.addresses[0],
1773+
self.RouterB.addresses[0],
1774+
"closest/fleabag")
1775+
test.run()
1776+
self.assertIsNone(test.error)
1777+
1778+
def test_03_multicast(self):
1779+
"""
1780+
Verify that disposition state set by the publisher is available to all
1781+
consumers
1782+
"""
1783+
rxs = [MyExtendedReceiver(self.RouterA.addresses[0],
1784+
"multicast/thingy")
1785+
for x in range(3)]
1786+
self.RouterA.wait_address("multicast/thingy", subscribers=3)
1787+
sleep(0.5) # let subscribers grant credit
1788+
tx = MyExtendedSender(self.RouterB.addresses[0],
1789+
"multicast/thingy")
1790+
tx.wait()
1791+
1792+
# DISPATCH-1705: only one of the receivers gets the data, but all
1793+
# should get the state
1794+
1795+
ext_data = None
1796+
for rx in rxs:
1797+
rx.stop()
1798+
try:
1799+
while True:
1800+
dispo = rx.remote_states.pop()
1801+
self.assertEqual(999, dispo[0])
1802+
ext_data = dispo[1] or ext_data
1803+
except IndexError:
1804+
pass
1805+
self.assertEqual([1, 2, 3], ext_data)
18081806

18091807

18101808
class MyExtendedSender(AsyncTestSender):

0 commit comments

Comments
 (0)