[ https://issues.apache.org/jira/browse/ARTEMIS-3243?focusedWorklogId=631267&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-631267 ]
ASF GitHub Bot logged work on ARTEMIS-3243: ------------------------------------------- Author: ASF GitHub Bot Created on: 29/Jul/21 18:36 Start Date: 29/Jul/21 18:36 Worklog Time Spent: 10m Work Description: clebertsuconic commented on a change in pull request #3633: URL: https://github.com/apache/activemq-artemis/pull/3633#discussion_r679395910 ########## File path: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/ValidateAMQPErrorsTest.java ########## @@ -0,0 +1,643 @@ +/** + * 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 + * <p> + * http://www.apache.org/licenses/LICENSE-2.0 + * <p> + * 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.amqp.connect; + +import javax.jms.Connection; +import javax.jms.ConnectionFactory; +import javax.jms.MessageConsumer; +import javax.jms.MessageProducer; +import javax.jms.Session; +import javax.jms.TextMessage; +import java.net.URI; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.CyclicBarrier; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +import io.vertx.core.Vertx; +import io.vertx.proton.ProtonConnection; +import io.vertx.proton.ProtonServerOptions; +import org.apache.activemq.artemis.core.config.amqpBrokerConnectivity.AMQPBrokerConnectConfiguration; +import org.apache.activemq.artemis.core.config.amqpBrokerConnectivity.AMQPBrokerConnectionAddressType; +import org.apache.activemq.artemis.core.config.amqpBrokerConnectivity.AMQPBrokerConnectionElement; +import org.apache.activemq.artemis.core.config.amqpBrokerConnectivity.AMQPMirrorBrokerConnectionElement; +import org.apache.activemq.artemis.core.server.ActiveMQServer; +import org.apache.activemq.artemis.logs.AssertionLoggerHandler; +import org.apache.activemq.artemis.protocol.amqp.broker.ActiveMQProtonRemotingConnection; +import org.apache.activemq.artemis.protocol.amqp.broker.ProtonProtocolManager; +import org.apache.activemq.artemis.protocol.amqp.connect.AMQPBrokerConnection; +import org.apache.activemq.artemis.protocol.amqp.connect.mirror.AMQPMirrorControllerSource; +import org.apache.activemq.artemis.tests.integration.amqp.AmqpClientTestSupport; +import org.apache.activemq.artemis.tests.util.CFUtil; +import org.apache.activemq.artemis.tests.util.Wait; +import org.apache.activemq.artemis.utils.SpawnedVMSupport; +import org.apache.activemq.artemis.utils.collections.ConcurrentHashSet; +import org.apache.activemq.transport.amqp.client.AmqpClient; +import org.apache.activemq.transport.amqp.client.AmqpConnection; +import org.apache.activemq.transport.amqp.client.AmqpSender; +import org.apache.activemq.transport.amqp.client.AmqpSession; +import org.apache.qpid.proton.amqp.Symbol; +import org.apache.qpid.proton.amqp.messaging.Accepted; +import org.apache.qpid.proton.amqp.transport.AmqpError; +import org.apache.qpid.proton.amqp.transport.ErrorCondition; +import org.apache.qpid.proton.amqp.transport.Target; +import org.apache.qpid.proton.engine.Link; +import org.apache.qpid.proton.engine.Receiver; +import org.apache.qpid.proton.engine.impl.ConnectionImpl; +import org.jboss.logging.Logger; +import org.junit.After; +import org.junit.Assert; +import org.junit.Test; + +import static java.util.EnumSet.of; +import static org.apache.qpid.proton.engine.EndpointState.ACTIVE; + +/** + * This test will make sure the Broker connection will react accordingly to a few misconfigs and possible errors on the network of brokers and eventually qipd-dispatch. + */ +public class ValidateAMQPErrorsTest extends AmqpClientTestSupport { + + protected static final int AMQP_PORT_2 = 5673; + private static final Logger logger = Logger.getLogger(ValidateAMQPErrorsTest.class); + protected Vertx vertx; + + protected MockServer mockServer; + + public static void main(String[] arg) { + if (arg[0].equals("testClientMissingCapabilities")) { + try { + AmqpClient client = new AmqpClient(new URI("tcp://localhost:" + AMQP_PORT), null, null); + AmqpConnection connection = client.connect(); + AmqpSession session = connection.createSession(); + // The createSender here will block. That's the reason why we are using a separate process Review comment: @gemmellr the client code will execute the following code, and it will hang on sync: ```java final ClientFuture request = new ClientFuture(); connection.getScheduler().execute(new Runnable() { @Override public void run() { checkClosed(); sender.setStateInspector(getStateInspector()); sender.open(request); pumpToProtonTransport(request); } }); request.sync(); ``` I thought this would be a problem for the test client only and I wasn't bothered about fiixing it on the specific case here. Since you have a lot more experience with the client side, perhaps I should use a different client and expect different results? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 631267) Time Spent: 32h 50m (was: 32h 40m) > Enhance AMQP Mirror support with dual mirror > -------------------------------------------- > > Key: ARTEMIS-3243 > URL: https://issues.apache.org/jira/browse/ARTEMIS-3243 > Project: ActiveMQ Artemis > Issue Type: Bug > Affects Versions: 2.17.0 > Reporter: Clebert Suconic > Assignee: Clebert Suconic > Priority: Major > Fix For: 2.18.0 > > Time Spent: 32h 50m > Remaining Estimate: 0h > > at the current Mirror version, we can only mirror into a single direction. > With this enhancement the two (or more brokers) would be connected to each > other, each one having its own ID, and each one would send updates to the > other broker. > The outcome is that if you just transferred producers and consumers from one > broker into the other, the fallback would be automatic and simple. No need to > disable and enable mirror options. -- This message was sent by Atlassian Jira (v8.3.4#803005)