[ 
https://issues.apache.org/jira/browse/ARTEMIS-4568?focusedWorklogId=900450&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-900450
 ]

ASF GitHub Bot logged work on ARTEMIS-4568:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Jan/24 15:30
            Start Date: 18/Jan/24 15:30
    Worklog Time Spent: 10m 
      Work Description: tabish121 commented on code in PR #4742:
URL: https://github.com/apache/activemq-artemis/pull/4742#discussion_r1457611057


##########
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/amqpBrokerConnectivity/AMQPBrokerConnectionElementTest.java:
##########
@@ -0,0 +1,101 @@
+/*
+ * 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.core.config.amqpBrokerConnectivity;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+
+import org.junit.Test;
+
+/**
+ * Test basic API functionality of the AMQPBrokerConnectionElement type
+ */
+public class AMQPBrokerConnectionElementTest {
+
+   @Test
+   public void testEquals() {
+      AMQPBrokerConnectionElement element1 = new AMQPBrokerConnectionElement();
+      AMQPBrokerConnectionElement element2 = new AMQPBrokerConnectionElement();
+
+      assertEquals(element1, element2);
+
+      // Name
+      element1.setName("test");
+      assertNotEquals(element1, element2);
+      element2.setName("test");
+      assertEquals(element1, element2);
+
+      // Match Address
+      element1.setMatchAddress("test");
+      assertNotEquals(element1, element2);
+      element2.setMatchAddress("test");
+      assertEquals(element1, element2);
+
+      // Queue Name
+      element1.setQueueName("test");
+      assertNotEquals(element1, element2);
+      element2.setQueueName("test");
+      assertEquals(element1, element2);
+
+      // Type
+      element1.setType(AMQPBrokerConnectionAddressType.MIRROR);
+      assertNotEquals(element1, element2);
+      element2.setType(AMQPBrokerConnectionAddressType.MIRROR);
+      assertEquals(element1, element2);
+   }
+
+   @Test
+   public void testHashCode() {
+      AMQPBrokerConnectionElement element1 = new AMQPBrokerConnectionElement();
+      AMQPBrokerConnectionElement element2 = new AMQPBrokerConnectionElement();
+
+      assertEquals(element1.hashCode(), element2.hashCode());
+
+      // Name
+      element1.setName("test");
+      assertNotEquals(element1.hashCode(), element2.hashCode());
+      element2.setName("test");
+      assertEquals(element1.hashCode(), element2.hashCode());
+
+      // Match Address
+      element1.setMatchAddress("test");
+      assertNotEquals(element1.hashCode(), element2.hashCode());
+      element2.setMatchAddress("test");
+      assertEquals(element1.hashCode(), element2.hashCode());
+
+      // Queue Name
+      element1.setQueueName("test");
+      assertNotEquals(element1.hashCode(), element2.hashCode());
+      element2.setQueueName("test");
+      assertEquals(element1.hashCode(), element2.hashCode());
+
+      // Type
+      element1.setType(AMQPBrokerConnectionAddressType.MIRROR);
+      assertNotEquals(element1.hashCode(), element2.hashCode());
+      element2.setType(AMQPBrokerConnectionAddressType.MIRROR);
+      assertEquals(element1.hashCode(), element2.hashCode());
+
+      // Parent
+      final AMQPBrokerConnectConfiguration parent = new 
AMQPBrokerConnectConfiguration();
+
+      element1.setParent(parent);
+      assertNotEquals(element1.hashCode(), element2.hashCode());
+      element2.setParent(parent);
+      assertEquals(element1.hashCode(), element2.hashCode());

Review Comment:
   I've sent a commit that updates the test to check that the parent doesn't 
affect those methods





Issue Time Tracking
-------------------

    Worklog Id:     (was: 900450)
    Time Spent: 40m  (was: 0.5h)

> Support reloading AMQP broker federation configuration
> ------------------------------------------------------
>
>                 Key: ARTEMIS-4568
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4568
>             Project: ActiveMQ Artemis
>          Issue Type: New Feature
>          Components: AMQP, Configuration
>    Affects Versions: 2.31.2
>            Reporter: Timothy A. Bish
>            Assignee: Timothy A. Bish
>            Priority: Minor
>             Fix For: 2.32.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Add support for reload of AMQP federation broker connection configuration 
> from XML and broker properties such that active federations are stopped and 
> updated with new configuration settings, and support add and remove of AMQP 
> federation broker connections.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to