Github user jbertram commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2345#discussion_r225517433
  
    --- Diff: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/RemoteBindingWithoutLoadBalancingTest.java
 ---
    @@ -0,0 +1,92 @@
    +/*
    + * 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.cluster.distribution;
    +
    +import 
org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType;
    +import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
    +import org.junit.Before;
    +import org.junit.Test;
    +
    +public class RemoteBindingWithoutLoadBalancingTest extends ClusterTestBase 
{
    +
    +   private static final IntegrationTestLogger log = 
IntegrationTestLogger.LOGGER;
    +
    +   @Override
    +   @Before
    +   public void setUp() throws Exception {
    +      super.setUp();
    +
    +      setupServers();
    +   }
    +
    +   protected boolean isNetty() {
    +      return false;
    +   }
    +
    +   /**
    +    * It's possible that when a cluster has disabled message load 
balancing then a message
    +    * sent to a node that only has a corresponding remote queue binding 
will trigger a
    +    * stack overflow.
    +    */
    +   @Test
    +   public void testStackOverflow() throws Exception {
    +      setupCluster();
    +
    +      startServers();
    +
    +      setupSessionFactory(0, isNetty());
    +      setupSessionFactory(1, isNetty());
    +
    +      createQueue(0, "queues.testaddress", "queue0", null, false);
    +
    +      waitForBindings(0, "queues.testaddress", 1, 0, true);
    +
    +      waitForBindings(1, "queues.testaddress", 1, 0, false);
    +
    +      send(1, "queues.testaddress", 1, false, null);
    --- End diff --
    
    @michalxo, my guess is that you're sending the message with a JMS client.  
The test is using the core API which doesn't auto-create queues.


---

Reply via email to