[
https://issues.apache.org/jira/browse/DISPATCH-2319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17485989#comment-17485989
]
ASF GitHub Bot commented on DISPATCH-2319:
------------------------------------------
kgiusti commented on a change in pull request #1507:
URL: https://github.com/apache/qpid-dispatch/pull/1507#discussion_r797850860
##########
File path: tests/system_tests_one_router.py
##########
@@ -1551,31 +1586,35 @@ def on_start(self, event):
"test_43")
self.timer = event.reactor.schedule(TIMEOUT, TestTimeout(self))
- def cancel_custom(self):
- self.custom_timer.cancel()
+ def send(self):
+ msg = Message(id=(self.n_sent + 1),
+ body={'sequence': (self.n_sent + 1),
+ 'msg_str': self.msg_str})
+ # Presettle the delivery.
+ dlv = self.sender.send(msg)
+ dlv.settle()
+ self.n_sent += 1
- def on_sendable(self, event):
+ def send_remaining(self):
while self.n_sent < self.n_messages:
- msg = Message(id=(self.n_sent + 1),
- body={'sequence': (self.n_sent + 1),
- 'msg_str': self.msg_str})
- # Presettle the delivery.
- dlv = self.sender.send(msg)
- dlv.settle()
- self.n_sent += 1
+ self.send()
+ if self.n_sent == self.n_messages:
Review comment:
Kinda hard to leave that loop without n_sent == n_messages :P
##########
File path: tests/system_tests_one_router.py
##########
@@ -1514,17 +1547,20 @@ def __init__(self, addr, n_messages,
begin_ingress_count, begin_dropped_presettl
self.custom_timer = None
self.timer = None
self.begin_dropped_presettled_count = begin_dropped_presettled_count
- self.begin_ingress_count = begin_ingress_count
self.str1 = "0123456789abcdef"
self.msg_str = ""
self.max_tries = 10
self.reactor = None
for i in range(8192):
self.msg_str += self.str1
self.timer_instance = PresettledCustomTimeout(self)
+ self.send_timer = SendPresettledAfterReceiverCloses(self)
Review comment:
two things: I think self.timer_instance is no longer used, and doesn't
self.send_timer need to be None here?
##########
File path: tests/system_tests_one_router.py
##########
@@ -1514,17 +1547,20 @@ def __init__(self, addr, n_messages,
begin_ingress_count, begin_dropped_presettl
self.custom_timer = None
self.timer = None
self.begin_dropped_presettled_count = begin_dropped_presettled_count
- self.begin_ingress_count = begin_ingress_count
self.str1 = "0123456789abcdef"
self.msg_str = ""
self.max_tries = 10
self.reactor = None
for i in range(8192):
self.msg_str += self.str1
self.timer_instance = PresettledCustomTimeout(self)
+ self.send_timer = SendPresettledAfterReceiverCloses(self)
- def schedule_timer(self):
- self.custom_timer = self.reactor.schedule(0.5, self.timer_instance)
+ def schedule_custom_timer(self):
+ self.custom_timer = self.reactor.schedule(0.5,
PresettledCustomTimeout(self))
Review comment:
You'll need to explicitly cancel these new timers in bail() else
proactor won't exit.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> system_tests_one_router.test_43_dropped_presettled_receiver_stops fails
> -----------------------------------------------------------------------
>
> Key: DISPATCH-2319
> URL: https://issues.apache.org/jira/browse/DISPATCH-2319
> Project: Qpid Dispatch
> Issue Type: Bug
> Components: Tests
> Reporter: Ganesh Murthy
> Assignee: Ganesh Murthy
> Priority: Major
>
> {noformat}
> 21: ___________ OneRouterTest.test_43_dropped_presettled_receiver_stops
> ____________
> 21:
> 21: self = <system_tests_one_router.OneRouterTest
> testMethod=test_43_dropped_presettled_receiver_stops>
> 21:
> 21: def test_43_dropped_presettled_receiver_stops(self):
> 21: local_node = Node.connect(self.address, timeout=TIMEOUT)
> 21: res = local_node.query('org.apache.qpid.dispatch.router')
> 21: deliveries_ingress =
> res.attribute_names.index('deliveriesIngress')
> 21: presettled_dropped_count =
> res.attribute_names.index('droppedPresettledDeliveries')
> 21: ingress_delivery_count = res.results[0][deliveries_ingress]
> 21: test = DroppedPresettledTest(self.address, 200,
> ingress_delivery_count, presettled_dropped_count)
> 21: test.run()
> 21: > self.assertIsNone(test.error)
> 21: E AssertionError: 'Messages sent to the router is 200, Messages
> processed by the router is 107' is not None
> 21:
> 21:
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_tests_one_router.py:666:
> AssertionError
> 21: - generated xml file:
> /__w/qpid-dispatch/qpid-dispatch/qpid-dispatch/build/tests/junitxmls/system_tests_one_router.xml
> -
> 21: =========================== short test summary info
> ============================
> 21: FAILED ::OneRouterTest::test_43_dropped_presettled_receiver_stops -
> Assertion...
> 21: =================== 1 failed, 55 passed in 77.73s (0:01:17)
> ====================
> 10/38 Test #21: system_tests_one_router .................***Failed 78.00
> sec {noformat}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]