[
https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16284342#comment-16284342
]
ASF GitHub Bot commented on PROTON-1517:
----------------------------------------
Github user codecov-io commented on the issue:
https://github.com/apache/qpid-proton/pull/110
# [Codecov](https://codecov.io/gh/apache/qpid-proton/pull/110?src=pr&el=h1)
Report
> Merging
[#110](https://codecov.io/gh/apache/qpid-proton/pull/110?src=pr&el=desc) into
[master](https://codecov.io/gh/apache/qpid-proton/commit/1ff005f661e070d72397cdc3a431854693626b97?src=pr&el=desc)
will **decrease** coverage by `0.35%`.
> The diff coverage is `68.19%`.
[](https://codecov.io/gh/apache/qpid-proton/pull/110?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #110 +/- ##
==========================================
- Coverage 78.67% 78.31% -0.36%
==========================================
Files 231 232 +1
Lines 30546 30687 +141
Branches 2903 2927 +24
==========================================
+ Hits 24033 24034 +1
- Misses 4872 4912 +40
- Partials 1641 1741 +100
```
| [Impacted
Files](https://codecov.io/gh/apache/qpid-proton/pull/110?src=pr&el=tree) |
Coverage Δ | |
|---|---|---|
|
[proton-c/bindings/cpp/src/scalar\_test.hpp](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-cHJvdG9uLWMvYmluZGluZ3MvY3BwL3NyYy9zY2FsYXJfdGVzdC5ocHA=)
| `100% <ø> (ø)` | |
|
[examples/c/send-ssl.c](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-ZXhhbXBsZXMvYy9zZW5kLXNzbC5j)
| `76.28% <ø> (ø)` | :arrow_up: |
|
[examples/c/send.c](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-ZXhhbXBsZXMvYy9zZW5kLmM=)
| `75.82% <ø> (ø)` | :arrow_up: |
|
[proton-c/bindings/cpp/src/connection\_driver.cpp](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-cHJvdG9uLWMvYmluZGluZ3MvY3BwL3NyYy9jb25uZWN0aW9uX2RyaXZlci5jcHA=)
| `77.77% <ø> (ø)` | |
|
[examples/cpp/multithreaded\_client.cpp](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-ZXhhbXBsZXMvY3BwL211bHRpdGhyZWFkZWRfY2xpZW50LmNwcA==)
| `81.81% <ø> (ø)` | :arrow_up: |
|
[examples/c/send-abort.c](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-ZXhhbXBsZXMvYy9zZW5kLWFib3J0LmM=)
| `76.34% <ø> (ø)` | :arrow_up: |
|
[examples/c/direct.c](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-ZXhhbXBsZXMvYy9kaXJlY3QuYw==)
| `83.63% <ø> (ø)` | :arrow_up: |
|
[proton-c/bindings/cpp/src/types\_internal.hpp](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-cHJvdG9uLWMvYmluZGluZ3MvY3BwL3NyYy90eXBlc19pbnRlcm5hbC5ocHA=)
| `94.73% <ø> (ø)` | |
|
[proton-c/src/core/message.c](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-cHJvdG9uLWMvc3JjL2NvcmUvbWVzc2FnZS5j)
| `59.53% <ø> (-0.78%)` | :arrow_down: |
|
[examples/cpp/ssl\_client\_cert.cpp](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-ZXhhbXBsZXMvY3BwL3NzbF9jbGllbnRfY2VydC5jcHA=)
| `81.08% <ø> (ø)` | :arrow_up: |
| ... and [71
more](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree-more)
| |
------
[Continue to review full report at
Codecov](https://codecov.io/gh/apache/qpid-proton/pull/110?src=pr&el=continue).
> **Legend** - [Click here to learn
more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by
[Codecov](https://codecov.io/gh/apache/qpid-proton/pull/110?src=pr&el=footer).
Last update
[1ff005f...a4dafa2](https://codecov.io/gh/apache/qpid-proton/pull/110?src=pr&el=lastupdated).
Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
> SyncRequestResponse(BlockingConnection).call() fails with timeout
> -----------------------------------------------------------------
>
> Key: PROTON-1517
> URL: https://issues.apache.org/jira/browse/PROTON-1517
> Project: Qpid Proton
> Issue Type: Bug
> Components: python-binding
> Affects Versions: proton-c-0.17.0
> Environment: macOS Sierra 10.12.5
> Python 3.6.1
> Reporter: aikchar
> Assignee: Justin Ross
> Labels: easyfix, patch
> Fix For: proton-c-0.19.0
>
>
> Send a QMFv2 message using SyncRequestResponse.call(). The response times out.
> h2. Repro
> This repro uses the example from
> https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/sync_client.py.html.
> {noformat}
> $ python
> Python 3.6.1 (default, Apr 24 2017, 09:59:45)
> [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> address =
> >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct'
> >>> from proton import Url
> >>> url = Url(address)
> >>>
> >>> from proton.utils import SyncRequestResponse, BlockingConnection
> >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15,
> >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'),
> >>> 'qmf.default.direct')
> >>>
> >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}}
> >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode':
> >>> '_query_request', 'method': 'request'}
> >>>
> >>> from proton import Message
> >>> m = Message(reply_to=client.receiver.remote_source.address,
> >>> address=address, body=content, properties=properties, subject='broker')
> >>> r = client.call(m)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File
> "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py",
> line 400, in call
> self.connection.wait(wakeup, msg="Waiting for response")
> File
> "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py",
> line 288, in wait
> raise Timeout(txt)
> proton.Timeout: Connection
> amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct
> timed out: Waiting for response
> >>>
> {noformat}
> h2. Patch
> Patch is to make sure correlation_id is a string.
> {noformat}
> $ git diff
> diff --git a/proton-c/bindings/python/proton/utils.py
> b/proton-c/bindings/python/proton/utils.py
> index 05ef80df..528ce338 100644
> --- a/proton-c/bindings/python/proton/utils.py
> +++ b/proton-c/bindings/python/proton/utils.py
> @@ -349,7 +349,7 @@ class SyncRequestResponse(IncomingMessageHandler):
> if not self.address and not request.address:
> raise ValueError("Request message has no address: %s" % request)
> request.reply_to = self.reply_to
> - request.correlation_id = correlation_id = self.correlation_id.next()
> + request.correlation_id = correlation_id =
> str(self.correlation_id.next())
> self.sender.send(request)
> def wakeup():
> return self.response and (self.response.correlation_id ==
> correlation_id)
> {noformat}
> After applying the patch, the response does not time out.
> {noformat}
> $ python
> Python 3.6.1 (default, Apr 24 2017, 09:59:45)
> [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> address =
> >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct'
> >>> from proton import Url
> >>> url = Url(address)
> >>>
> >>> from proton.utils import SyncRequestResponse, BlockingConnection
> >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15,
> >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'),
> >>> 'qmf.default.direct')
> >>>
> >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}}
> >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode':
> >>> '_query_request', 'method': 'request'}
> >>>
> >>> from proton import Message
> >>> m = Message(reply_to=client.receiver.remote_source.address,
> >>> address=address, body=content, properties=properties, subject='broker')
> >>> r = client.call(m)
> >>> r.body
> [{'_create_ts': ulong(1500315523092865467), '_delete_ts': ulong(0),
> '_object_id': {'_agent_epoch': ulong(3), '_object_name':
> b'org.apache.qpid.broker:queue:420cb745-f3c7-4a47-ac09-0a4711f10058:1.0'},
> '_schema_id': {'_class_name': b'queue', '_hash':
> UUID('84ce326e-2cbd-6899-80d7-6267d3327e0f'), '_package_name':
> b'org.apache.qpid.broker', '_type': b'_data'}, '_update_ts':
> ulong(1500315525896122413), '_values': {'acquires': ulong(1), 'arguments':
> {}, 'autoDelete': True, 'bindingCount': uint(2), 'bindingCountHigh': uint(2),
> 'bindingCountLow': uint(2), 'byteDepth': ulong(0), 'byteFtdDepth': ulong(0),
> 'byteFtdDequeues': ulong(0), 'byteFtdEnqueues': ulong(0),
> 'bytePersistDequeues': ulong(0), 'bytePersistEnqueues': ulong(0),
> 'byteTotalDequeues': ulong(189), 'byteTotalEnqueues': ulong(189),
> 'byteTxnDequeues': ulong(0), 'byteTxnEnqueues': ulong(0), 'consumerCount':
> uint(1), 'consumerCountHigh': uint(1), 'consumerCountLow': uint(1),
> 'creator': b'REDACTED_USERNAME@QPID', 'discardsLvq': ulong(0),
> 'discardsOverflow': ulong(0), 'discardsPurge': ulong(0), 'discardsRing':
> ulong(0), 'discardsSubscriber': ulong(0), 'discardsTtl': ulong(0), 'durable':
> False, 'exclusive': True, 'flowStopped': False, 'flowStoppedCount': uint(0),
> 'messageLatencyAvg': int32(0), 'messageLatencyCount': ulong(0),
> 'messageLatencyMax': ulong(0), 'messageLatencyMin': int32(0), 'msgDepth':
> ulong(0), 'msgFtdDepth': ulong(0), 'msgFtdDequeues': ulong(0),
> 'msgFtdEnqueues': ulong(0), 'msgPersistDequeues': ulong(0),
> 'msgPersistEnqueues': ulong(0), 'msgTotalDequeues': ulong(1),
> 'msgTotalEnqueues': ulong(1), 'msgTxnDequeues': ulong(0), 'msgTxnEnqueues':
> ulong(0), 'name': b'420cb745-f3c7-4a47-ac09-0a4711f10058:1.0',
> 'redirectPeer': b'', 'redirectSource': False, 'releases': ulong(0),
> 'reroutes': ulong(0), 'unackedMessages': uint(0), 'unackedMessagesHigh':
> uint(0), 'unackedMessagesLow': uint(0), 'vhostRef': {'_object_name':
> b'org.apache.qpid.broker:vhost:org.apache.qpid.broker:broker:amqp-broker,/'}}}]
> >>> exit()
> Assertion failed: (r == 0), function k5_mutex_lock, file
> ../../include/k5-thread.h, line 366.
> Abort trap: 6
> $
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]