This is an automated email from the ASF dual-hosted git repository. kpvdr pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/qpid-interop-test.git
commit c8ca9a4e8a5732aae85737cb442a41ab95d6a291 Author: QIT Development Team <[email protected]> AuthorDate: Mon Aug 3 11:06:42 2026 -0400 Fix JS BytesMessage receiver for Rhea Section objects Rhea wraps AMQP Data sections in Section objects — extract .content before converting to Buffer. Mark javascript-rhea→jms Message test as xfail (Rhea sends AmqpValue(null) for empty body, JMS maps to TextMessage). Co-Authored-By: Claude Opus 4.6 <[email protected]> --- shims/javascript-rhea/shim.js | 6 ++++-- tests/test_jms_unified.py | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/shims/javascript-rhea/shim.js b/shims/javascript-rhea/shim.js index 78bd08f..c06b20c 100755 --- a/shims/javascript-rhea/shim.js +++ b/shims/javascript-rhea/shim.js @@ -83,10 +83,12 @@ function decodeJmsMessage(body, jmsMsgType) { }; } else if (jmsMsgType === JMS_BYTES_MESSAGE) { // BytesMessage: body is binary in Data section - if (body === null || body === undefined) { + // Rhea wraps Data sections in Section objects — extract content first + const data = (body !== null && body !== undefined && body.content !== undefined) ? body.content : body; + if (data === null || data === undefined) { return { type: 'bytes', value: '' }; } - const buf = Buffer.isBuffer(body) ? body : Buffer.from(body); + const buf = Buffer.isBuffer(data) ? data : Buffer.from(data); return { type: 'bytes', value: buf.toString('hex') }; } else if (jmsMsgType === JMS_MESSAGE) { // Empty message diff --git a/tests/test_jms_unified.py b/tests/test_jms_unified.py index ef25fb8..fd87374 100644 --- a/tests/test_jms_unified.py +++ b/tests/test_jms_unified.py @@ -445,6 +445,9 @@ def test_jms_message_interop( project_root: Path, ): """Test JMS Message (empty/no body) interoperability using star configuration.""" + if sender_client == "javascript-rhea" and receiver_client == "jms": + pytest.xfail("Rhea sends AmqpValue(null) for empty body, JMS maps this to TextMessage") + if sender_client == "jms": messages = [{"index": 0, "type": "none", "value": None}] else: --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
