You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2018/03/22 20:19:08 UTC
[1/4] activemq-artemis git commit: ARTEMIS-1765 Adding
StompWithLargeMessageTest
Repository: activemq-artemis
Updated Branches:
refs/heads/master 37657f22f -> fae3a8fad
ARTEMIS-1765 Adding StompWithLargeMessageTest
This closes #1965
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/51f105da
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/51f105da
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/51f105da
Branch: refs/heads/master
Commit: 51f105da7b1d416bc42533895645e34c34d0371d
Parents: 552e4a2
Author: Howard Gao <ho...@gmail.com>
Authored: Thu Mar 22 12:24:39 2018 +0800
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu Mar 22 16:06:37 2018 -0400
----------------------------------------------------------------------
.../stomp/StompWithLargeMessagesTest.java | 44 +++++++++++---------
1 file changed, 24 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/51f105da/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithLargeMessagesTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithLargeMessagesTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithLargeMessagesTest.java
index 38da2d2..eb515bd 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithLargeMessagesTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithLargeMessagesTest.java
@@ -69,29 +69,33 @@ public class StompWithLargeMessagesTest extends StompTestBase {
public void testSendReceiveLargeMessage() throws Exception {
StompClientConnection conn = StompClientConnectionFactory.createClientConnection(uri);
- String address = "testLargeMessageAddress";
- server.getActiveMQServer().createQueue(SimpleString.toSimpleString(address), RoutingType.ANYCAST, SimpleString.toSimpleString(address), null, true, false);
-
- // STOMP default is UTF-8 == 1 byte per char.
- int largeMessageStringSize = 10 * 1024 * 1024; // 10MB
- StringBuilder b = new StringBuilder(largeMessageStringSize);
- for (int i = 0; i < largeMessageStringSize; i++) {
- b.append('t');
- }
- String payload = b.toString();
+ try {
+ String address = "testLargeMessageAddress";
+ server.getActiveMQServer().createQueue(SimpleString.toSimpleString(address), RoutingType.ANYCAST, SimpleString.toSimpleString(address), null, true, false);
+
+ // STOMP default is UTF-8 == 1 byte per char.
+ int largeMessageStringSize = 10 * 1024 * 1024; // 10MB
+ StringBuilder b = new StringBuilder(largeMessageStringSize);
+ for (int i = 0; i < largeMessageStringSize; i++) {
+ b.append('t');
+ }
+ String payload = b.toString();
- // Set up STOMP subscription
- conn.connect(defUser, defPass);
- subscribe(conn, null, Stomp.Headers.Subscribe.AckModeValues.AUTO, null, null, address, true);
+ // Set up STOMP subscription
+ conn.connect(defUser, defPass);
+ subscribe(conn, null, Stomp.Headers.Subscribe.AckModeValues.AUTO, null, null, address, true);
- // Send Large Message
- System.out.println("Sending Message Size: " + largeMessageStringSize);
- send(conn, address, null, payload);
+ // Send Large Message
+ System.out.println("Sending Message Size: " + largeMessageStringSize);
+ send(conn, address, null, payload);
- // Receive STOMP Message
- ClientStompFrame frame = conn.receiveFrame();
- System.out.println(frame.getBody().length());
- assertTrue(frame.getBody().equals(payload));
+ // Receive STOMP Message
+ ClientStompFrame frame = conn.receiveFrame();
+ System.out.println(frame.getBody().length());
+ assertTrue(frame.getBody().equals(payload));
+ } finally {
+ conn.disconnect();
+ }
}
//stomp sender -> large -> stomp receiver
[3/4] activemq-artemis git commit: ARTEMIS-1765 Fixing Large Message
Compression and Conversion
Posted by cl...@apache.org.
ARTEMIS-1765 Fixing Large Message Compression and Conversion
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/e86acd48
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/e86acd48
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/e86acd48
Branch: refs/heads/master
Commit: e86acd4824d3a94d124693fbd7887a1f1b9b072c
Parents: 51f105d
Author: Clebert Suconic <cl...@apache.org>
Authored: Thu Mar 22 10:40:59 2018 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu Mar 22 16:11:11 2018 -0400
----------------------------------------------------------------------
.../activemq/artemis/api/core/ICoreMessage.java | 7 +++
.../artemis/core/message/impl/CoreMessage.java | 65 ++++++++++++++++++++
.../amqp/converter/jms/ServerJMSMessage.java | 2 +-
.../core/protocol/mqtt/MQTTPublishManager.java | 4 +-
.../core/protocol/mqtt/MQTTSessionCallback.java | 1 -
.../protocol/mqtt/MQTTSubscriptionManager.java | 2 +-
.../openwire/OpenWireMessageConverter.java | 2 +-
.../core/protocol/stomp/StompSession.java | 38 +-----------
.../tests/integration/client/ConsumerTest.java | 20 +++++-
9 files changed, 96 insertions(+), 45 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e86acd48/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ICoreMessage.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ICoreMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ICoreMessage.java
index 179f8c5..f0eb1b6 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ICoreMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/ICoreMessage.java
@@ -42,6 +42,13 @@ public interface ICoreMessage extends Message {
ActiveMQBuffer getReadOnlyBodyBuffer();
/**
+ * Returns a readOnlyBodyBuffer or a decompressed one if the message is compressed.
+ * or the large message buffer.
+ * @return
+ */
+ ActiveMQBuffer getDataBuffer();
+
+ /**
* Return the type of the message
*/
@Override
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e86acd48/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
index 5ed46cd..0918828 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
@@ -21,8 +21,11 @@ import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.LinkedList;
import java.util.Set;
+import java.util.zip.DataFormatException;
+import java.util.zip.Inflater;
import io.netty.buffer.ByteBuf;
+import io.netty.buffer.UnpooledByteBufAllocator;
import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.api.core.ActiveMQBuffers;
import org.apache.activemq.artemis.api.core.ActiveMQException;
@@ -38,6 +41,7 @@ import org.apache.activemq.artemis.core.message.LargeBodyEncoder;
import org.apache.activemq.artemis.core.persistence.Persister;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
import org.apache.activemq.artemis.reader.MessageUtil;
+import org.apache.activemq.artemis.utils.ByteUtil;
import org.apache.activemq.artemis.utils.DataConstants;
import org.apache.activemq.artemis.utils.UUID;
import org.apache.activemq.artemis.utils.collections.TypedProperties;
@@ -213,6 +217,67 @@ public class CoreMessage extends RefCountMessage implements ICoreMessage {
return new ChannelBufferWrapper(buffer.slice(BODY_OFFSET, endOfBodyPosition - BUFFER_HEADER_SPACE).setIndex(0, endOfBodyPosition - BUFFER_HEADER_SPACE).asReadOnly());
}
+ /**
+ * This will return the proper buffer to represent the data of the Message. If compressed it will decompress.
+ * If large, it will read from the file or streaming.
+ * @return
+ * @throws ActiveMQException
+ */
+ @Override
+ public ActiveMQBuffer getDataBuffer() {
+
+ ActiveMQBuffer buffer;
+
+ try {
+ if (isLargeMessage()) {
+ buffer = getLargeMessageBuffer();
+ } else {
+ buffer = getReadOnlyBodyBuffer();
+ }
+
+ if (Boolean.TRUE.equals(getBooleanProperty(Message.HDR_LARGE_COMPRESSED))) {
+ buffer = inflate(buffer);
+ }
+ } catch (Exception e) {
+ logger.warn(e.getMessage(), e);
+ return getReadOnlyBodyBuffer();
+ }
+
+ return buffer;
+ }
+
+ private ActiveMQBuffer getLargeMessageBuffer() throws ActiveMQException {
+ ActiveMQBuffer buffer;
+ LargeBodyEncoder encoder = getBodyEncoder();
+ encoder.open();
+ int bodySize = (int) encoder.getLargeBodySize();
+
+ buffer = new ChannelBufferWrapper(UnpooledByteBufAllocator.DEFAULT.heapBuffer(bodySize));
+
+ encoder.encode(buffer, bodySize);
+ encoder.close();
+ return buffer;
+ }
+
+ private ActiveMQBuffer inflate(ActiveMQBuffer buffer) throws DataFormatException {
+ int bytesToRead = buffer.readableBytes();
+ Inflater inflater = new Inflater();
+ inflater.setInput(ByteUtil.getActiveArray(buffer.readBytes(bytesToRead).toByteBuffer()));
+
+ //get the real size of large message
+ long sizeBody = getLongProperty(Message.HDR_LARGE_BODY_SIZE);
+
+ byte[] data = new byte[(int) sizeBody];
+ inflater.inflate(data);
+ inflater.end();
+ ActiveMQBuffer qbuff = ActiveMQBuffers.wrappedBuffer(data);
+ qbuff.resetReaderIndex();
+ qbuff.resetWriterIndex();
+ qbuff.writeBytes(data);
+ buffer = qbuff;
+ return buffer;
+ }
+
@Override
public SimpleString getGroupID() {
return this.getSimpleStringProperty(Message.HDR_GROUP_ID);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e86acd48/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/jms/ServerJMSMessage.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/jms/ServerJMSMessage.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/jms/ServerJMSMessage.java
index b070591..0ef2041 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/jms/ServerJMSMessage.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/jms/ServerJMSMessage.java
@@ -73,7 +73,7 @@ public class ServerJMSMessage implements Message {
protected ActiveMQBuffer getReadBodyBuffer() {
if (readBodyBuffer == null) {
// to avoid clashes between multiple threads
- readBodyBuffer = message.getReadOnlyBodyBuffer();
+ readBodyBuffer = message.getDataBuffer();
}
return readBodyBuffer;
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e86acd48/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java
index febc364..667f5be 100644
--- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java
+++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java
@@ -269,7 +269,7 @@ public class MQTTPublishManager {
switch (message.getType()) {
case Message.TEXT_TYPE:
try {
- SimpleString text = message.getReadOnlyBodyBuffer().readNullableSimpleString();
+ SimpleString text = message.getDataBuffer().readNullableSimpleString();
byte[] stringPayload = text.toString().getBytes("UTF-8");
payload = ByteBufAllocator.DEFAULT.buffer(stringPayload.length);
payload.writeBytes(stringPayload);
@@ -278,7 +278,7 @@ public class MQTTPublishManager {
log.warn("Unable to send message: " + message.getMessageID() + " Cause: " + e.getMessage(), e);
}
default:
- ActiveMQBuffer bodyBuffer = message.getReadOnlyBodyBuffer();
+ ActiveMQBuffer bodyBuffer = message.getDataBuffer();
payload = ByteBufAllocator.DEFAULT.buffer(bodyBuffer.writerIndex());
payload.writeBytes(bodyBuffer.byteBuf());
break;
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e86acd48/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSessionCallback.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSessionCallback.java b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSessionCallback.java
index 39e2ba9..a49cf11 100644
--- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSessionCallback.java
+++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSessionCallback.java
@@ -64,7 +64,6 @@ public class MQTTSessionCallback implements SessionCallback {
byte[] body,
boolean continues,
boolean requiresResponse) {
- log.warn("Sending LARGE MESSAGE");
return 1;
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e86acd48/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSubscriptionManager.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSubscriptionManager.java b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSubscriptionManager.java
index 49ab5d9..4093f5e 100644
--- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSubscriptionManager.java
+++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSubscriptionManager.java
@@ -154,7 +154,7 @@ public class MQTTSubscriptionManager {
*/
private void createConsumerForSubscriptionQueue(Queue queue, String topic, int qos) throws Exception {
long cid = session.getServer().getStorageManager().generateID();
- ServerConsumer consumer = session.getServerSession().createConsumer(cid, queue.getName(), null, false, true, -1);
+ ServerConsumer consumer = session.getServerSession().createConsumer(cid, queue.getName(), null, false, false, -1);
consumer.setStarted(true);
consumers.put(topic, consumer);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e86acd48/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java
index 66fff2d..fd1f732 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java
@@ -513,7 +513,7 @@ public final class OpenWireMessageConverter {
final Boolean compressProp = (Boolean) coreMessage.getObjectProperty(AMQ_MSG_COMPRESSED);
final boolean isCompressed = compressProp == null ? false : compressProp.booleanValue();
final byte[] bytes;
- final ActiveMQBuffer buffer = coreMessage.getReadOnlyBodyBuffer();
+ final ActiveMQBuffer buffer = coreMessage.getDataBuffer();
buffer.resetReaderIndex();
switch (coreType) {
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e86acd48/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompSession.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompSession.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompSession.java
index 0a12b47..8a573e6 100644
--- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompSession.java
+++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompSession.java
@@ -23,17 +23,13 @@ import java.util.Set;
import java.util.concurrent.BlockingDeque;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.LinkedBlockingDeque;
-import java.util.zip.Inflater;
-import io.netty.buffer.UnpooledByteBufAllocator;
import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
import org.apache.activemq.artemis.api.core.ICoreMessage;
import org.apache.activemq.artemis.api.core.Message;
import org.apache.activemq.artemis.api.core.Pair;
import org.apache.activemq.artemis.api.core.RoutingType;
import org.apache.activemq.artemis.api.core.SimpleString;
-import org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper;
-import org.apache.activemq.artemis.core.message.LargeBodyEncoder;
import org.apache.activemq.artemis.core.message.impl.CoreMessage;
import org.apache.activemq.artemis.core.persistence.OperationContext;
import org.apache.activemq.artemis.core.persistence.StorageManager;
@@ -47,7 +43,6 @@ import org.apache.activemq.artemis.core.server.impl.ServerSessionImpl;
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
import org.apache.activemq.artemis.spi.core.protocol.SessionCallback;
import org.apache.activemq.artemis.spi.core.remoting.ReadyListener;
-import org.apache.activemq.artemis.utils.ByteUtil;
import org.apache.activemq.artemis.utils.ConfigurationHelper;
import org.apache.activemq.artemis.utils.PendingTask;
import org.apache.activemq.artemis.utils.UUIDGenerator;
@@ -142,38 +137,7 @@ public class StompSession implements SessionCallback {
if (subscription == null)
return 0;
StompFrame frame;
- ActiveMQBuffer buffer;
-
- if (coreMessage.isLargeMessage()) {
- LargeBodyEncoder encoder = coreMessage.getBodyEncoder();
- encoder.open();
- int bodySize = (int) encoder.getLargeBodySize();
-
- buffer = new ChannelBufferWrapper(UnpooledByteBufAllocator.DEFAULT.heapBuffer(bodySize));
-
- encoder.encode(buffer, bodySize);
- encoder.close();
- } else {
- buffer = coreMessage.getReadOnlyBodyBuffer();
- }
-
- if (Boolean.TRUE.equals(serverMessage.getBooleanProperty(Message.HDR_LARGE_COMPRESSED))) {
- ActiveMQBuffer qbuff = buffer;
- int bytesToRead = qbuff.readerIndex();
- Inflater inflater = new Inflater();
- inflater.setInput(ByteUtil.getActiveArray(qbuff.readBytes(bytesToRead).toByteBuffer()));
-
- //get the real size of large message
- long sizeBody = newServerMessage.getLongProperty(Message.HDR_LARGE_BODY_SIZE);
-
- byte[] data = new byte[(int) sizeBody];
- inflater.inflate(data);
- inflater.end();
- qbuff.resetReaderIndex();
- qbuff.resetWriterIndex();
- qbuff.writeBytes(data);
- buffer = qbuff;
- }
+ ActiveMQBuffer buffer = coreMessage.getDataBuffer();
frame = connection.createStompMessage(newServerMessage, buffer, subscription, deliveryCount);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e86acd48/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerTest.java
index 0b36e18..f103d41 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerTest.java
@@ -421,7 +421,10 @@ public class ConsumerTest extends ActiveMQTestBase {
private ConnectionFactory createFactory(int protocol) {
switch (protocol) {
- case 1: return new ActiveMQConnectionFactory();// core protocol
+ case 1: ActiveMQConnectionFactory coreCF = new ActiveMQConnectionFactory();// core protocol
+ coreCF.setCompressLargeMessage(true);
+ coreCF.setMinLargeMessageSize(10 * 1024);
+ return coreCF;
case 2: return new JmsConnectionFactory("amqp://localhost:61616"); // amqp
case 3: return new org.apache.activemq.ActiveMQConnectionFactory("tcp://localhost:61616"); // openwire
default: return null;
@@ -446,7 +449,15 @@ public class ConsumerTest extends ActiveMQTestBase {
TextMessage msg = session.createTextMessage("hello");
msg.setIntProperty("mycount", 0);
producer.send(msg);
- connection.close();
+
+ StringBuffer bufferLarge = new StringBuffer();
+ while (bufferLarge.length() < 100 * 1024) {
+ bufferLarge.append(" ");
+ }
+
+ msg = session.createTextMessage(bufferLarge.toString());
+ msg.setIntProperty("mycount", 1);
+ producer.send(msg);
connection = factoryConsume.createConnection();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -461,6 +472,11 @@ public class ConsumerTest extends ActiveMQTestBase {
Assert.assertEquals(0, message.getIntProperty("mycount"));
Assert.assertEquals("hello", message.getText());
+ message = (TextMessage) consumer.receive(1000);
+ Assert.assertNotNull(message);
+ Assert.assertEquals(1, message.getIntProperty("mycount"));
+ Assert.assertEquals(bufferLarge.toString(), message.getText());
+
Wait.waitFor(() -> server.getPagingManager().getGlobalSize() == 0, 5000, 100);
Assert.assertEquals(0, server.getPagingManager().getGlobalSize());
[2/4] activemq-artemis git commit: NO-JIRA cleanup System.out on
compatibility tests
Posted by cl...@apache.org.
NO-JIRA cleanup System.out on compatibility tests
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/552e4a28
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/552e4a28
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/552e4a28
Branch: refs/heads/master
Commit: 552e4a2844fcaa5e983b2daee3408d584445e887
Parents: 37657f2
Author: Clebert Suconic <cl...@apache.org>
Authored: Thu Mar 22 16:06:17 2018 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu Mar 22 16:06:37 2018 -0400
----------------------------------------------------------------------
.../resources/addressConfig/artemisServer.groovy | 1 -
.../resources/addressConfig/receiveMessages.groovy | 1 -
.../addressConfig/sendMessagesAddress.groovy | 2 --
.../src/main/resources/clients/artemisClient.groovy | 2 --
.../main/resources/exportimport/artemisServer.groovy | 3 ---
.../src/main/resources/exportimport/export.groovy | 1 -
.../src/main/resources/exportimport/export1X.groovy | 1 -
.../src/main/resources/exportimport/import.groovy | 1 -
.../src/main/resources/meshTest/sendMessages.groovy | 11 -----------
.../resources/oldAddressSpace/artemisServer.groovy | 1 -
.../resources/oldAddressSpace/receiveMessages.groovy | 4 ----
.../oldAddressSpace/sendMessagesAddress.groovy | 6 ------
.../resources/prefixSendAckTest/artemisServer.groovy | 3 ---
.../prefixSendAckTest/sendAckMessages.groovy | 7 -------
.../resources/sendAckTest/sendAckMessages.groovy | 7 -------
.../src/main/resources/serial/jbmserial.groovy | 3 ---
.../src/main/resources/serial/serial.groovy | 2 --
.../src/main/resources/servers/artemisServer.groovy | 4 ----
.../tests/compatibility/VersionedBaseTest.java | 15 +++++----------
19 files changed, 5 insertions(+), 70 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/addressConfig/artemisServer.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/addressConfig/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/addressConfig/artemisServer.groovy
index 31faf30..0f85332 100644
--- a/tests/compatibility-tests/src/main/resources/addressConfig/artemisServer.groovy
+++ b/tests/compatibility-tests/src/main/resources/addressConfig/artemisServer.groovy
@@ -32,7 +32,6 @@ String id = "server"
configuration = new ConfigurationImpl();
configuration.setJournalType(JournalType.NIO);
-System.out.println("folder:: " + folder);
configuration.setBrokerInstance(new File(folder + "/" + id));
configuration.addAcceptorConfiguration("artemis", "tcp://0.0.0.0:61616?anycastPrefix=jms.queue.&multicastPrefix=jms.topic.");
configuration.setSecurityEnabled(false);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/addressConfig/receiveMessages.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/addressConfig/receiveMessages.groovy b/tests/compatibility-tests/src/main/resources/addressConfig/receiveMessages.groovy
index 06b825a..0dbf4ba 100644
--- a/tests/compatibility-tests/src/main/resources/addressConfig/receiveMessages.groovy
+++ b/tests/compatibility-tests/src/main/resources/addressConfig/receiveMessages.groovy
@@ -28,7 +28,6 @@ Connection connection = cf.createConnection();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
Queue queue = session.createQueue("myQueue");
-System.out.println("Receiving ");
MessageConsumer consumer = session.createConsumer(queue)
connection.start()
for (int i = 0; i < 500; i++) {
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/addressConfig/sendMessagesAddress.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/addressConfig/sendMessagesAddress.groovy b/tests/compatibility-tests/src/main/resources/addressConfig/sendMessagesAddress.groovy
index a1198b8..b75f8f5 100644
--- a/tests/compatibility-tests/src/main/resources/addressConfig/sendMessagesAddress.groovy
+++ b/tests/compatibility-tests/src/main/resources/addressConfig/sendMessagesAddress.groovy
@@ -26,7 +26,6 @@ Connection connection = cf.createConnection();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
Queue queue = session.createQueue("myQueue");
-println("sending...")
MessageProducer producer = session.createProducer(queue);
producer.setDeliveryMode(DeliveryMode.PERSISTENT);
@@ -44,7 +43,6 @@ for (int i = 0; i < 500; i++) {
session.commit();
connection.close();
-System.out.println("Message sent");
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/clients/artemisClient.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/clients/artemisClient.groovy b/tests/compatibility-tests/src/main/resources/clients/artemisClient.groovy
index 0926e0a..54cd10a 100644
--- a/tests/compatibility-tests/src/main/resources/clients/artemisClient.groovy
+++ b/tests/compatibility-tests/src/main/resources/clients/artemisClient.groovy
@@ -21,8 +21,6 @@ package clients
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
import org.apache.activemq.artemis.tests.compatibility.GroovyRun;
-println("serverType " + serverArg[0]);
-
if (serverArg[0].startsWith("HORNETQ")) {
cf = new ActiveMQConnectionFactory("tcp://localhost:61616?protocolManagerFactoryStr=org.apache.activemq.artemis.core.protocol.hornetq.client.HornetQClientProtocolManagerFactory&confirmationWindowSize=1048576&blockOnDurableSend=false");
} else {
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/exportimport/artemisServer.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/exportimport/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/exportimport/artemisServer.groovy
index c6d7a7b..92d2a10 100644
--- a/tests/compatibility-tests/src/main/resources/exportimport/artemisServer.groovy
+++ b/tests/compatibility-tests/src/main/resources/exportimport/artemisServer.groovy
@@ -31,11 +31,8 @@ String type = arg[2];
String producer = arg[3];
String consumer = arg[4];
-println("type = " + type);
-
configuration = new ConfigurationImpl();
configuration.setJournalType(JournalType.NIO);
-System.out.println("folder:: " + folder);
configuration.setBrokerInstance(new File(folder + "/" + id));
configuration.addAcceptorConfiguration("artemis", "tcp://0.0.0.0:61616");
configuration.setSecurityEnabled(false);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/exportimport/export.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/exportimport/export.groovy b/tests/compatibility-tests/src/main/resources/exportimport/export.groovy
index d7781a1..bad99e7 100644
--- a/tests/compatibility-tests/src/main/resources/exportimport/export.groovy
+++ b/tests/compatibility-tests/src/main/resources/exportimport/export.groovy
@@ -19,7 +19,6 @@ import org.apache.activemq.artemis.cli.commands.ActionContext
import org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataExporter
-System.out.println("Arg::" + arg[0]);
File pagingfile = new File(arg[0] + "/sender/data/paging")
pagingfile.mkdirs()
XmlDataExporter exporter = new XmlDataExporter();
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/exportimport/export1X.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/exportimport/export1X.groovy b/tests/compatibility-tests/src/main/resources/exportimport/export1X.groovy
index f7ea1f2..79b81c1 100644
--- a/tests/compatibility-tests/src/main/resources/exportimport/export1X.groovy
+++ b/tests/compatibility-tests/src/main/resources/exportimport/export1X.groovy
@@ -18,7 +18,6 @@
import org.apache.activemq.artemis.cli.commands.ActionContext
import org.apache.activemq.artemis.cli.commands.tools.XmlDataExporter
-System.out.println("Arg::" + arg[0]);
File pagingfile = new File(arg[0] + "/sender/data/paging")
pagingfile.mkdirs()
XmlDataExporter exporter = new XmlDataExporter();
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/exportimport/import.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/exportimport/import.groovy b/tests/compatibility-tests/src/main/resources/exportimport/import.groovy
index d3be0e3..39481d5 100644
--- a/tests/compatibility-tests/src/main/resources/exportimport/import.groovy
+++ b/tests/compatibility-tests/src/main/resources/exportimport/import.groovy
@@ -18,7 +18,6 @@ import org.apache.activemq.artemis.cli.commands.ActionContext
import org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataImporter
-System.out.println("Arg::" + arg[0]);
File pagingfile = new File(arg[0] + "/sender/data/paging")
pagingfile.mkdirs()
XmlDataImporter importer = new XmlDataImporter();
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/meshTest/sendMessages.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/meshTest/sendMessages.groovy b/tests/compatibility-tests/src/main/resources/meshTest/sendMessages.groovy
index 2e0e8a8..6a5e370 100644
--- a/tests/compatibility-tests/src/main/resources/meshTest/sendMessages.groovy
+++ b/tests/compatibility-tests/src/main/resources/meshTest/sendMessages.groovy
@@ -60,8 +60,6 @@ BYTES_BODY[2] = (byte) 0x77;
String textBody = "a rapadura e doce mas nao e mole nao";
-println("serverType " + serverType);
-
if (clientType.startsWith("ARTEMIS")) {
// Can't depend directly on artemis, otherwise it wouldn't compile in hornetq
GroovyRun.evaluate("clients/artemisClient.groovy", "serverArg", serverType);
@@ -84,12 +82,9 @@ if (operation.equals("sendTopic") || operation.equals("receiveNonDurableSubscrip
if (operation.equals("sendAckMessages") || operation.equals("sendTopic")) {
- println("sending...")
MessageProducer producer = session.createProducer(destination);
producer.setDeliveryMode(DeliveryMode.PERSISTENT);
- System.out.println("Sending messages");
-
TextMessage message = session.createTextMessage(textBody);
message.setStringProperty(HDR_DUPLICATE_DETECTION_ID, "some-duplicate");
message.setStringProperty("prop", "test");
@@ -136,7 +131,6 @@ if (operation.equals("sendAckMessages") || operation.equals("sendTopic")) {
session.commit();
connection.close();
- System.out.println("Message sent");
}
if (operation.equals("receiveMessages") || operation.equals("receiveNonDurableSubscription")) {
@@ -149,8 +143,6 @@ if (operation.equals("receiveMessages") || operation.equals("receiveNonDurableSu
latch.countDown();
}
- System.out.println("Receiving messages");
-
TextMessage message = (TextMessage) consumer.receive(5000);
GroovyRun.assertNotNull(message);
GroovyRun.assertEquals(textBody, message.getText());
@@ -174,8 +166,6 @@ if (operation.equals("receiveMessages") || operation.equals("receiveNonDurableSu
byte[] data = new byte[1024];
- System.out.println("Message = " + rm);
-
for (int i = 0; i < LARGE_MESSAGE_SIZE; i += 1024) {
int numberOfBytes = rm.readBytes(data);
GroovyRun.assertEquals(1024, numberOfBytes);
@@ -206,7 +196,6 @@ if (operation.equals("receiveMessages") || operation.equals("receiveNonDurableSu
session.commit();
connection.close();
- System.out.println("Message received");
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/oldAddressSpace/artemisServer.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/oldAddressSpace/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/oldAddressSpace/artemisServer.groovy
index 85f6619..40bacca 100644
--- a/tests/compatibility-tests/src/main/resources/oldAddressSpace/artemisServer.groovy
+++ b/tests/compatibility-tests/src/main/resources/oldAddressSpace/artemisServer.groovy
@@ -39,7 +39,6 @@ String topicAddress = "jms.topic.myTopic";
configuration = new ConfigurationImpl();
configuration.setJournalType(JournalType.NIO);
-System.out.println("folder:: " + folder);
configuration.setBrokerInstance(new File(folder + "/" + id));
configuration.addAcceptorConfiguration("artemis", "tcp://0.0.0.0:61616");
configuration.setSecurityEnabled(false);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/oldAddressSpace/receiveMessages.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/oldAddressSpace/receiveMessages.groovy b/tests/compatibility-tests/src/main/resources/oldAddressSpace/receiveMessages.groovy
index 1594cc8..632993f 100644
--- a/tests/compatibility-tests/src/main/resources/oldAddressSpace/receiveMessages.groovy
+++ b/tests/compatibility-tests/src/main/resources/oldAddressSpace/receiveMessages.groovy
@@ -41,8 +41,6 @@ if (clientType.startsWith("ARTEMIS-1") || clientType.startsWith("HORNETQ")) {
topic = session.createTopic("jms.topic.myTopic");
}
-System.out.println("Receiving...");
-
MessageConsumer topicConsumer = session.createDurableSubscriber(topic, "myDurableSub")
MessageConsumer queueConsumer = session.createConsumer(queue)
@@ -57,7 +55,6 @@ for (int i = 0; i < 500; i++) {
}
}
session.commit();
-System.out.println("Consumed all messages from Queue");
for (int i = 0; i < 500; i++) {
BytesMessage bytesMessage = (BytesMessage) topicConsumer.receive(5000);
@@ -67,7 +64,6 @@ for (int i = 0; i < 500; i++) {
}
}
session.commit();
-System.out.println("Consumed all messages from Topic");
// Defined on AddressConfigTest.java at the test with setVariable
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/oldAddressSpace/sendMessagesAddress.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/oldAddressSpace/sendMessagesAddress.groovy b/tests/compatibility-tests/src/main/resources/oldAddressSpace/sendMessagesAddress.groovy
index 9ade9bb..c24306e 100644
--- a/tests/compatibility-tests/src/main/resources/oldAddressSpace/sendMessagesAddress.groovy
+++ b/tests/compatibility-tests/src/main/resources/oldAddressSpace/sendMessagesAddress.groovy
@@ -38,12 +38,9 @@ if (clientType.startsWith("ARTEMIS-1") || clientType.startsWith("HORNETQ")) {
topic = session.createTopic("jms.topic.myTopic");
}
-System.out.println("Receiving ");
MessageProducer queueProducer = session.createProducer(queue)
MessageProducer topicProducer = session.createProducer(topic);
-println("sending...")
-
queueProducer.setDeliveryMode(DeliveryMode.PERSISTENT);
for (int i = 0; i < 500; i++) {
BytesMessage bytesMessage = session.createBytesMessage();
@@ -56,7 +53,6 @@ for (int i = 0; i < 500; i++) {
}
}
session.commit();
-println("Sent Queue Messages.")
queueProducer.setDeliveryMode(DeliveryMode.PERSISTENT);
for (int i = 0; i < 500; i++) {
@@ -70,10 +66,8 @@ for (int i = 0; i < 500; i++) {
}
}
session.commit();
-println("Sent Topic Messages.")
connection.close();
-System.out.println("All Messages sent");
senderLatch.countDown();
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/prefixSendAckTest/artemisServer.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/prefixSendAckTest/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/prefixSendAckTest/artemisServer.groovy
index 7663c65..b85cfcf 100644
--- a/tests/compatibility-tests/src/main/resources/prefixSendAckTest/artemisServer.groovy
+++ b/tests/compatibility-tests/src/main/resources/prefixSendAckTest/artemisServer.groovy
@@ -31,11 +31,8 @@ String type = arg[2];
String producer = arg[3];
String consumer = arg[4];
-println("type = " + type);
-
configuration = new ConfigurationImpl();
configuration.setJournalType(JournalType.NIO);
-System.out.println("folder:: " + folder);
configuration.setBrokerInstance(new File(folder + "/" + id));
configuration.addAcceptorConfiguration("artemis", "tcp://0.0.0.0:61616");
configuration.setSecurityEnabled(false);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/prefixSendAckTest/sendAckMessages.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/prefixSendAckTest/sendAckMessages.groovy b/tests/compatibility-tests/src/main/resources/prefixSendAckTest/sendAckMessages.groovy
index 9c945a6..a24ad83 100644
--- a/tests/compatibility-tests/src/main/resources/prefixSendAckTest/sendAckMessages.groovy
+++ b/tests/compatibility-tests/src/main/resources/prefixSendAckTest/sendAckMessages.groovy
@@ -39,8 +39,6 @@ if (clientType.equals(GroovyRun.SNAPSHOT) || clientType.equals(GroovyRun.TWO_FOU
String textBody = "a rapadura e doce mas nao e mole nao";
-println("serverType " + serverType);
-
if (clientType.startsWith("ARTEMIS")) {
// Can't depend directly on artemis, otherwise it wouldn't compile in hornetq
GroovyRun.evaluate("clients/artemisClient.groovy", "serverArg", serverType);
@@ -78,15 +76,11 @@ if (operation.equals("sendAckMessages")) {
GroovyRun.assertTrue(latch.await(10, TimeUnit.SECONDS));
- System.out.println("Sending messages");
connection.close();
- System.out.println("Message sent");
} else if (operation.equals("receiveMessages")) {
MessageConsumer consumer = session.createConsumer(queue);
connection.start();
- System.out.println("Receiving messages");
-
for (int i = 0; i < 10; i++) {
TextMessage message = consumer.receive(1000);
GroovyRun.assertNotNull(message);
@@ -95,7 +89,6 @@ if (operation.equals("sendAckMessages")) {
GroovyRun.assertNull(consumer.receiveNoWait());
connection.close();
- System.out.println("Message received");
} else {
throw new RuntimeException("Invalid operation " + operation);
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/sendAckTest/sendAckMessages.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/sendAckTest/sendAckMessages.groovy b/tests/compatibility-tests/src/main/resources/sendAckTest/sendAckMessages.groovy
index 75751f1..b0814ce 100644
--- a/tests/compatibility-tests/src/main/resources/sendAckTest/sendAckMessages.groovy
+++ b/tests/compatibility-tests/src/main/resources/sendAckTest/sendAckMessages.groovy
@@ -34,8 +34,6 @@ String queueName = "queue";
String textBody = "a rapadura e doce mas nao e mole nao";
-println("serverType " + serverType);
-
if (clientType.startsWith("ARTEMIS")) {
// Can't depend directly on artemis, otherwise it wouldn't compile in hornetq
GroovyRun.evaluate("clients/artemisClient.groovy", "serverArg", serverType);
@@ -73,15 +71,11 @@ if (operation.equals("sendAckMessages")) {
GroovyRun.assertTrue(latch.await(10, TimeUnit.SECONDS));
- System.out.println("Sending messages");
connection.close();
- System.out.println("Message sent");
} else if (operation.equals("receiveMessages")) {
MessageConsumer consumer = session.createConsumer(queue);
connection.start();
- System.out.println("Receiving messages");
-
for (int i = 0; i < 10; i++) {
TextMessage message = consumer.receive(1000);
GroovyRun.assertNotNull(message);
@@ -90,7 +84,6 @@ if (operation.equals("sendAckMessages")) {
GroovyRun.assertNull(consumer.receiveNoWait());
connection.close();
- System.out.println("Message received");
} else {
throw new RuntimeException("Invalid operation " + operation);
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/serial/jbmserial.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/serial/jbmserial.groovy b/tests/compatibility-tests/src/main/resources/serial/jbmserial.groovy
index b80dddb..02ee468 100644
--- a/tests/compatibility-tests/src/main/resources/serial/jbmserial.groovy
+++ b/tests/compatibility-tests/src/main/resources/serial/jbmserial.groovy
@@ -32,9 +32,6 @@ import org.apache.activemq.artemis.jms.client.*
file = arg[0]
method = arg[1]
version = arg[2]
-System.out.println("File::" + file);
-
-
// Get the factory for the "river" marshalling protocol
final MarshallerFactory factory = Marshalling.getProvidedMarshallerFactory("river");
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/serial/serial.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/serial/serial.groovy b/tests/compatibility-tests/src/main/resources/serial/serial.groovy
index f5a3e5f..7caa332 100644
--- a/tests/compatibility-tests/src/main/resources/serial/serial.groovy
+++ b/tests/compatibility-tests/src/main/resources/serial/serial.groovy
@@ -25,8 +25,6 @@ import org.apache.activemq.artemis.jms.client.*
file = arg[0]
method = arg[1]
version = arg[2]
-System.out.println("File::" + file)
-
if (method.equals("write")) {
cf = new ActiveMQConnectionFactory("tcp://localhost:61616?confirmationWindowSize=1048576&blockOnDurableSend=false");
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/main/resources/servers/artemisServer.groovy
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/main/resources/servers/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/servers/artemisServer.groovy
index 913c971..6661447 100644
--- a/tests/compatibility-tests/src/main/resources/servers/artemisServer.groovy
+++ b/tests/compatibility-tests/src/main/resources/servers/artemisServer.groovy
@@ -34,12 +34,8 @@ String producer = arg[3];
String consumer = arg[4];
String globalMaxSize = arg[5];
-println("type = " + type);
-println("globalMaxSize = " + globalMaxSize);
-
configuration = new ConfigurationImpl();
configuration.setJournalType(JournalType.NIO);
-System.out.println("folder:: " + folder);
configuration.setBrokerInstance(new File(folder + "/" + id));
configuration.addAcceptorConfiguration("artemis", "tcp://0.0.0.0:61616?anycastPrefix=jms.queue.&multicastPrefix=jms.topic.");
configuration.setSecurityEnabled(false);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/552e4a28/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/VersionedBaseTest.java
----------------------------------------------------------------------
diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/VersionedBaseTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/VersionedBaseTest.java
index 9001180..96d96d7 100644
--- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/VersionedBaseTest.java
+++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/VersionedBaseTest.java
@@ -155,16 +155,13 @@ public abstract class VersionedBaseTest {
boolean ok = value != null && !value.trim().isEmpty();
if (!ok) {
System.out.println("Add \"-D" + name + "=\'CLASSPATH\'\" into your VM settings");
- } else {
- printed.add(name);
- System.out.println("****************************************************************************");
- System.out.println("* If you want to debug this test, add this parameter to your IDE run settings...");
- System.out.println("****************************************************************************");
- System.out.println("-D" + name + "=\"" + value + "\"");
- System.out.println("****************************************************************************");
+ System.out.println("You will see it in the output from mvn install at the compatibility-tests");
+ System.out.println("... look for output from dependency-scan");
+ // our dependency scan used at the pom under compatibility-tests/pom.xml will generate these, example:
+ // [INFO] dependency-scan setting: -DARTEMIS-140="/Users/someuser/....."
+ // copy that into your IDE setting and you should be able to debug it
}
-
Assume.assumeTrue("Cannot run these tests, no classpath found", ok);
}
@@ -195,8 +192,6 @@ public abstract class VersionedBaseTest {
public void startServer(File folder, ClassLoader loader, String serverName, String globalMaxSize) throws Throwable {
folder.mkdirs();
- System.out.println("Folder::" + folder);
-
String scriptToUse;
if (getServerScriptToUse() != null && getServerScriptToUse().length() != 0) {
scriptToUse = getServerScriptToUse();
[4/4] activemq-artemis git commit: This closes #1970
Posted by cl...@apache.org.
This closes #1970
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/fae3a8fa
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/fae3a8fa
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/fae3a8fa
Branch: refs/heads/master
Commit: fae3a8fadbd42d278adb7c43fb898cb42f7410f9
Parents: 37657f2 e86acd4
Author: Clebert Suconic <cl...@apache.org>
Authored: Thu Mar 22 16:13:45 2018 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu Mar 22 16:13:45 2018 -0400
----------------------------------------------------------------------
.../activemq/artemis/api/core/ICoreMessage.java | 7 +++
.../artemis/core/message/impl/CoreMessage.java | 65 ++++++++++++++++++++
.../amqp/converter/jms/ServerJMSMessage.java | 2 +-
.../core/protocol/mqtt/MQTTPublishManager.java | 4 +-
.../core/protocol/mqtt/MQTTSessionCallback.java | 1 -
.../protocol/mqtt/MQTTSubscriptionManager.java | 2 +-
.../openwire/OpenWireMessageConverter.java | 2 +-
.../core/protocol/stomp/StompSession.java | 38 +-----------
.../addressConfig/artemisServer.groovy | 1 -
.../addressConfig/receiveMessages.groovy | 1 -
.../addressConfig/sendMessagesAddress.groovy | 2 -
.../main/resources/clients/artemisClient.groovy | 2 -
.../resources/exportimport/artemisServer.groovy | 3 -
.../main/resources/exportimport/export.groovy | 1 -
.../main/resources/exportimport/export1X.groovy | 1 -
.../main/resources/exportimport/import.groovy | 1 -
.../main/resources/meshTest/sendMessages.groovy | 11 ----
.../oldAddressSpace/artemisServer.groovy | 1 -
.../oldAddressSpace/receiveMessages.groovy | 4 --
.../oldAddressSpace/sendMessagesAddress.groovy | 6 --
.../prefixSendAckTest/artemisServer.groovy | 3 -
.../prefixSendAckTest/sendAckMessages.groovy | 7 ---
.../sendAckTest/sendAckMessages.groovy | 7 ---
.../src/main/resources/serial/jbmserial.groovy | 3 -
.../src/main/resources/serial/serial.groovy | 2 -
.../main/resources/servers/artemisServer.groovy | 4 --
.../tests/compatibility/VersionedBaseTest.java | 15 ++---
.../tests/integration/client/ConsumerTest.java | 20 +++++-
.../stomp/StompWithLargeMessagesTest.java | 44 +++++++------
29 files changed, 125 insertions(+), 135 deletions(-)
----------------------------------------------------------------------