NO-JIRA Fixing Test

There's no semantic changes here, hence NO-JIRA
This commit is contained in:
Clebert Suconic 2020-05-01 12:29:19 -04:00
parent a38d58618b
commit 4ca6bac92d
1 changed files with 2 additions and 10 deletions

View File

@ -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();