This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
     new d4004eb2c6 ARTEMIS-5232 Removing dodgy test
d4004eb2c6 is described below

commit d4004eb2c6d60f34a7957375e6ea7c5ed1d18643
Author: Clebert Suconic <[email protected]>
AuthorDate: Mon Feb 10 21:53:45 2025 -0500

    ARTEMIS-5232 Removing dodgy test
    
    this test was failing here:
    
    
https://github.com/apache/activemq-artemis/blob/362dbd11ac132e66f7bce99eb0fb4aa020346210/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/SlowLargeMessageConsumerTest.java#L81
    
    Any sort of GC / compilation / hickup.. anything will make this test fail.
    
    I don't see much value on the test. Anyone who disagrees with me, please 
send a PR / commit fixing the test instead of removing it.  :)
---
 .../jms/client/SlowLargeMessageConsumerTest.java   | 85 ----------------------
 1 file changed, 85 deletions(-)

diff --git 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/SlowLargeMessageConsumerTest.java
 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/SlowLargeMessageConsumerTest.java
deleted file mode 100644
index 56e71a2c4f..0000000000
--- 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/SlowLargeMessageConsumerTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.activemq.artemis.tests.integration.jms.client;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.apache.activemq.artemis.core.server.ActiveMQServer;
-import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
-import org.apache.activemq.artemis.tests.util.JMSTestBase;
-import org.apache.commons.lang3.RandomUtils;
-import org.junit.jupiter.api.Test;
-
-public class SlowLargeMessageConsumerTest extends JMSTestBase {
-
-   private static final String TOPIC = "SlowLargeMessageConsumerTopic";
-
-
-   @Override
-   protected void extraServerConfig(ActiveMQServer server) {
-      server.getConfiguration().getAddressSettings().put(TOPIC, new 
AddressSettings().setExpiryDelay(100L).setMaxSizeBytes(1024));
-   }
-
-   /**
-     * @see <a 
href="https://issues.apache.org/jira/browse/ARTEMIS-4141";>ARTEMIS-4141</a>
-     */
-   @Test
-   public void ensureSlowConsumerOfLargeMessageNeverGetsStuck() throws 
Exception {
-      try (Connection conn = cf.createConnection()) {
-         conn.start();
-         try (Session sessionConsumer = conn.createSession(false, 
Session.CLIENT_ACKNOWLEDGE);
-              Session sessionProducer = conn.createSession(false, 
Session.CLIENT_ACKNOWLEDGE)) {
-            final Destination topic = sessionConsumer.createTopic(TOPIC);
-            final MessageConsumer consumer = 
sessionConsumer.createConsumer(topic);
-            final AtomicBoolean slow = new AtomicBoolean(true);
-            final CountDownLatch messageReceived = new CountDownLatch(1);
-            consumer.setMessageListener(message -> {
-               if (slow.get()) {
-                  try {
-                     TimeUnit.MILLISECONDS.sleep(50);
-                  } catch (InterruptedException ex) {
-                     Thread.currentThread().interrupt();
-                  }
-               } else {
-                  messageReceived.countDown();
-               }
-            });
-            final MessageProducer producer = 
sessionProducer.createProducer(topic);
-            int msgSize = 512 * 1024;
-            for (int i = 0; i < 100; i++) {
-               
producer.send(sessionProducer.createObjectMessage(RandomUtils.nextBytes(msgSize)));
-               TimeUnit.MILLISECONDS.sleep(25);
-            }
-            TimeUnit.MILLISECONDS.sleep(100);
-            slow.set(false);
-            
producer.send(sessionProducer.createObjectMessage(RandomUtils.nextBytes(msgSize)));
-            assertTrue(messageReceived.await(500, TimeUnit.MILLISECONDS));
-         }
-      }
-   }
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to