activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [activemq-artemis] branch master updated: NO-JIRA Fixing Test
Date Fri, 01 May 2020 17:39:56 GMT
This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/master by this push:
     new 4ca6bac  NO-JIRA Fixing Test
4ca6bac is described below

commit 4ca6bac92dcdf727394ef945cd2bf32ee3e8f616
Author: Clebert Suconic <clebertsuconic@apache.org>
AuthorDate: Fri May 1 12:29:19 2020 -0400

    NO-JIRA Fixing Test
    
    There's no semantic changes here, hence NO-JIRA
---
 .../tests/integration/crossprotocol/AMQPToOpenwireTest.java  | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToOpenwireTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToOpenwireTest.java
index 9782cd1..f2fa791 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToOpenwireTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToOpenwireTest.java
@@ -16,7 +16,6 @@
  */
 package org.apache.activemq.artemis.tests.integration.crossprotocol;
 
-import javax.jms.BytesMessage;
 import javax.jms.Connection;
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
@@ -24,8 +23,6 @@ import javax.jms.MessageProducer;
 import javax.jms.ObjectMessage;
 import javax.jms.Queue;
 import javax.jms.Session;
-import java.io.ByteArrayInputStream;
-import java.io.ObjectInputStream;
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.concurrent.TimeUnit;
@@ -105,16 +102,11 @@ public class AMQPToOpenwireTest extends ActiveMQTestBase {
          queue = session.createQueue(queueName);
          MessageConsumer consumer = session.createConsumer(queue);
          connection.start();
-         BytesMessage receive = (BytesMessage) consumer.receive(5000);
+         ObjectMessage receive = (ObjectMessage) consumer.receive(5000);
          assertNotNull(receive);
-         byte[] bytes = new byte[(int) receive.getBodyLength()];
-         receive.readBytes(bytes);
-         ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bytes));
-         list = (ArrayList) ois.readObject();
+         list = (ArrayList)receive.getObject();
          assertEquals(list.get(0), "aString");
          connection.close();
-      } catch (Exception e) {
-         e.printStackTrace();
       } finally {
          if (connection != null) {
             connection.close();


Mime
View raw message