qpid-proton mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PROTON-603) Python testReclaimCredit fails on Windows
Date Wed, 11 Jun 2014 21:16:04 GMT

    [ https://issues.apache.org/jira/browse/PROTON-603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14028405#comment-14028405
] 

ASF subversion and git services commented on PROTON-603:
--------------------------------------------------------

Commit 1602016 from chug@apache.org in branch 'proton/trunk'
[ https://svn.apache.org/r1602016 ]

PROTON-603: testCreditReclaim fails on windows
The issue is that during 'while client2.work(0): self.pump()' 
on windows the credit rebalancing is already happening. 
Testing that it hasn't yet happened causes the failure. 
The only safe thing to do is to keep calling pump and 
verify that the expected credits are achieved eventually.

> Python testReclaimCredit fails on Windows
> -----------------------------------------
>
>                 Key: PROTON-603
>                 URL: https://issues.apache.org/jira/browse/PROTON-603
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: 0.7
>         Environment: Windows
>            Reporter: Chuck Rolke
>         Attachments: messenger.py.patch
>
>
> Two loops have a set of asserts between them:
> {noformat}
>     # 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
> {noformat}
> 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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message