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 2020/11/20 19:48:16 UTC
[activemq-artemis] branch master updated: ARTEMIS-3006 Upgrading to
Qpid ProtonJ 0.33.8
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 af4d2cd ARTEMIS-3006 Upgrading to Qpid ProtonJ 0.33.8
new 6af31c4 This closes #3355
af4d2cd is described below
commit af4d2cd5fc9e7533a17519200d1ce49426b7d6b4
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Tue Nov 10 15:12:57 2020 -0500
ARTEMIS-3006 Upgrading to Qpid ProtonJ 0.33.8
I am also bringing a test I used to report https://issues.apache.org/jira/browse/PROTON-2297
Even though the issue here is on proton. There's no such thing as enough tests so I am keeping the test.
---
pom.xml | 2 +-
.../integration/amqp/AmqpLargeMessageTest.java | 33 ++++++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 4f13c56..6a7f83f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,7 +103,7 @@
<!-- this is basically for tests -->
<netty-tcnative-version>2.0.33.Final</netty-tcnative-version>
- <proton.version>0.33.6</proton.version>
+ <proton.version>0.33.8</proton.version>
<resteasy.version>3.0.19.Final</resteasy.version>
<slf4j.version>1.7.21</slf4j.version>
<qpid.jms.version>0.54.0</qpid.jms.version>
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpLargeMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpLargeMessageTest.java
index 6d8470b..c1235fa 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpLargeMessageTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpLargeMessageTest.java
@@ -44,6 +44,7 @@ import org.apache.activemq.artemis.api.core.RoutingType;
import org.apache.activemq.artemis.core.server.ActiveMQServer;
import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
+import org.apache.activemq.artemis.tests.util.CFUtil;
import org.apache.activemq.artemis.tests.util.Wait;
import org.apache.activemq.transport.amqp.client.AmqpClient;
import org.apache.activemq.transport.amqp.client.AmqpConnection;
@@ -324,6 +325,38 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@Test(timeout = 60000)
+ public void testHugeString() throws Exception {
+ ConnectionFactory factory = CFUtil.createConnectionFactory("AMQP", "tcp://localhost:5672");
+ Connection connection = factory.createConnection();
+ Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
+ Queue queue = session.createQueue(getQueueName());
+ MessageProducer producer = session.createProducer(queue);
+
+ StringBuilder unicodeStringBuilder = new StringBuilder();
+ for (char c = 1000; c < 11000; c++) {
+ unicodeStringBuilder.append(c);
+ }
+
+ String unicodeString = unicodeStringBuilder.toString();
+
+ StringBuilder builder = new StringBuilder();
+ while (builder.length() < 1024 * 1024) {
+ builder.append("hello " + unicodeString);
+ }
+ producer.send(session.createTextMessage(builder.toString()));
+ session.commit();
+
+ connection.start();
+
+ MessageConsumer consumer = session.createConsumer(queue);
+ TextMessage message = (TextMessage)consumer.receive(50_000);
+ Assert.assertNotNull(message);
+ session.commit();
+
+ Assert.assertEquals(builder.toString(), message.getText());
+ }
+
+ @Test(timeout = 60000)
public void testSendAMQPReceiveAMQPViaJMSObjectMessage() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));