[ https://issues.apache.org/jira/browse/ARTEMIS-4436?focusedWorklogId=881388&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-881388 ]
ASF GitHub Bot logged work on ARTEMIS-4436: ------------------------------------------- Author: ASF GitHub Bot Created on: 22/Sep/23 12:56 Start Date: 22/Sep/23 12:56 Worklog Time Spent: 10m Work Description: clebertsuconic commented on code in PR #4628: URL: https://github.com/apache/activemq-artemis/pull/4628#discussion_r1334344310 ########## tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/warnings/ClusterCleanNodeShutdownTest.java: ########## @@ -0,0 +1,108 @@ +/* + * 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.warnings; + +import java.lang.invoke.MethodHandles; +import java.util.Collection; + +import org.apache.activemq.artemis.api.core.SimpleString; +import org.apache.activemq.artemis.core.postoffice.Binding; +import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType; +import org.apache.activemq.artemis.logs.AssertionLoggerHandler; +import org.apache.activemq.artemis.tests.integration.cluster.distribution.ClusterTestBase; +import org.junit.Assert; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ClusterCleanNodeShutdownTest extends ClusterTestBase { + + private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + @Test + public void testNoWarningErrorsDuringRestartingNodesInCluster() throws Exception { + setupServer(0, isFileStorage(), isNetty()); + setupServer(1, isFileStorage(), isNetty()); + + setupClusterConnection("cluster0", "queues", MessageLoadBalancingType.ON_DEMAND, 1, isNetty(), 0, 1); + + setupClusterConnection("cluster1", "queues", MessageLoadBalancingType.ON_DEMAND, 1, isNetty(), 1, 0); + + startServers(0, 1); + Thread.sleep(2000); + + logger.debug("server 0 = {}", getServer(0).getNodeID()); + logger.debug("server 1 = {}", getServer(1).getNodeID()); + + setupSessionFactory(0, isNetty(), 15); + setupSessionFactory(1, isNetty()); + + // now create the 2 queues and make sure they are durable + createQueue(0, "queues.testaddress", "queue10", null, true); + createQueue(1, "queues.testaddress", "queue10", null, true); + + addConsumer(0, 0, "queue10", null); + + waitForBindings(0, "queues.testaddress", 1, 1, true); + waitForBindings(1, "queues.testaddress", 1, 0, true); + + waitForBindings(0, "queues.testaddress", 1, 0, false); + waitForBindings(1, "queues.testaddress", 1, 1, false); + + printBindings(2); + + sendInRange(1, "queues.testaddress", 0, 10, true, null); + + try (AssertionLoggerHandler loggerHandler = new AssertionLoggerHandler(true)) { + logger.info("*****************************************************************************"); + stopServers(0); + // Waiting some time after stopped + Thread.sleep(2000); Review Comment: Can. you use a Wait Clause here? Issue Time Tracking ------------------- Worklog Id: (was: 881388) Time Spent: 20m (was: 10m) > Artemis is logging warnings during clean shutdown of server in cluster > ---------------------------------------------------------------------- > > Key: ARTEMIS-4436 > URL: https://issues.apache.org/jira/browse/ARTEMIS-4436 > Project: ActiveMQ Artemis > Issue Type: Bug > Components: Clustering > Affects Versions: 2.30.0 > Reporter: Emmanuel Hugonnet > Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > If a node from a cluster shutdowns cleanly this shouldn't create WARN > messages in the logs -- This message was sent by Atlassian Jira (v8.20.10#820010)