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

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

                Author: ASF GitHub Bot
            Created on: 07/Oct/25 13:40
            Start Date: 07/Oct/25 13:40
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on code in PR #5952:
URL: https://github.com/apache/activemq-artemis/pull/5952#discussion_r2410681647


##########
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/persistence/SessionCloseTimeoutTest.java:
##########
@@ -0,0 +1,147 @@
+/*
+ * 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.persistence;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import java.lang.invoke.MethodHandles;
+import java.util.HashMap;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.activemq.artemis.api.core.ActiveMQException;
+import org.apache.activemq.artemis.api.core.QueueConfiguration;
+import org.apache.activemq.artemis.api.core.RoutingType;
+import org.apache.activemq.artemis.api.core.TransportConfiguration;
+import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl;
+import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.jms.client.ActiveMQMessageConsumer;
+import org.apache.activemq.artemis.logs.AssertionLoggerHandler;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
+import org.apache.activemq.artemis.tests.util.CFUtil;
+import org.apache.activemq.artemis.utils.RandomUtil;
+import org.apache.activemq.artemis.utils.Wait;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+/**
+ * A simple test-case used for documentation purposes.
+ */
+public class SessionCloseTimeoutTest extends ActiveMQTestBase {
+
+   private static final Logger logger = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+   ActiveMQServer server;
+
+   @BeforeEach
+   protected void createServer() throws Exception {
+
+      ConfigurationImpl configuration = 
createBasicConfig(0).setJMXManagementEnabled(false).addAcceptorConfiguration(new
 TransportConfiguration(INVM_ACCEPTOR_FACTORY, generateInVMParams(0), "invm"));
+
+      configuration.setCloseTimeout(500);
+
+      HashMap<String, Object> extraConfig = new HashMap<>();
+      HashMap<String, Object> regularConfig = new HashMap<>();
+      regularConfig.put("sessionCloseTimeout", 1000);
+
+      configuration.addAcceptorConfiguration(new 
TransportConfiguration(NETTY_ACCEPTOR_FACTORY, regularConfig, "netty", 
extraConfig));

Review Comment:
   oops.. thanks





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

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

> Lingering sessions after a storage timeout
> ------------------------------------------
>
>                 Key: ARTEMIS-5694
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5694
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.42.0
>            Reporter: Clebert Suconic
>            Assignee: Clebert Suconic
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.43.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> We had reports of sessions not closing for an unkown situation, probably on 
> storage.
> I am adding a timeout verification and adding extra logs in case this happens.



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

---------------------------------------------------------------------
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