activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-1341) Core JMS does not permit calling Message#getBytes(arbitrary type) when message has empty body
Date Fri, 08 Dec 2017 10:36:00 GMT

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

ASF GitHub Bot commented on ARTEMIS-1341:
-----------------------------------------

Github user michaelandrepearce commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1697#discussion_r155747541
  
    --- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/jms2client/BodyTest.java
---
    @@ -59,13 +58,19 @@ public void testBodyConversion() throws Throwable {
              producer.send(bytesMessage);
     
              Message msg = cons.receiveNoWait();
    -         assertNotNull(msg);
    --- End diff --
    
    this should be kept.


> Core JMS does not permit calling Message#getBytes(arbitrary type) when message has empty
body
> ---------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-1341
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1341
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.3.0
>            Reporter: Jiri Daněk
>            Priority: Trivial
>
> Consider the ActiveMQ Artemis test {{org.apache.activemq.artemis.tests.integration.jms.jms2client.BodyTest#testBodyConversion}}
adapted to run through multiple JMS ConnectionFactories in turn. This test passes with Core
JMS client, is skipped (or should be skipped) with ActiveMQ OpenWire client (that is a JMS
1.1 client) and fails with qpid-jms client.
> {noformat}
>          BytesMessage bytesMessage = sess.createBytesMessage();
>          producer.send(bytesMessage);
>          Message msg = cons.receiveNoWait();
>          assertNotNull(msg);
>          try {
>             msg.getBody(String.class);
>             fail("Exception expected");
>          } catch (MessageFormatException e) {
>          }
> {noformat}
> The test is wrong, see discussion with [~tabish121] at QPIDJMS-313 for details and references
as to why.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message