You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by clebertsuconic <gi...@git.apache.org> on 2018/06/11 21:34:41 UTC
[GitHub] activemq-artemis pull request #2135: ARTEMIS-1924 Add amqpIdleTimeout
GitHub user clebertsuconic opened a pull request:
https://github.com/apache/activemq-artemis/pull/2135
ARTEMIS-1924 Add amqpIdleTimeout
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/clebertsuconic/activemq-artemis ARTEMIS-1924
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/2135.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2135
----
commit dd702b481d29c8a583c9fe57470840a3c0e05c8d
Author: Clebert Suconic <cl...@...>
Date: 2018-06-11T21:11:25Z
ARTEMIS-1924 Add amqpIdleTimeout
----
---
[GitHub] activemq-artemis pull request #2135: ARTEMIS-1924 Add amqpIdleTimeout
Posted by tabish121 <gi...@git.apache.org>.
Github user tabish121 commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/2135#discussion_r194568008
--- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpNoHearbeatsTest.java ---
@@ -0,0 +1,83 @@
+/*
+ * 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.amqp;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Map;
+
+import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.transport.amqp.client.AmqpClient;
+import org.apache.activemq.transport.amqp.client.AmqpConnection;
+import org.apache.activemq.transport.amqp.client.AmqpValidator;
+import org.apache.qpid.proton.engine.Connection;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+@RunWith(Parameterized.class)
+public class AmqpNoHearbeatsTest extends AmqpClientTestSupport {
+
+ @Parameterized.Parameters(name = "useOverride={0}")
+ public static Collection<Object[]> parameters() {
+ return Arrays.asList(new Object[][] {
+ {true}, {false}
+ });
+ }
+
+ @Parameterized.Parameter(0)
+ public boolean useOverride;
+
+ @Override
+ protected void addConfiguration(ActiveMQServer server) {
+ if (useOverride) {
+ server.getConfiguration().setConnectionTTLOverride(0);
+ } else {
+ server.getConfiguration().setConnectionTtlCheckInterval(500);
+ }
+ }
+
+
+ @Override
+ protected void configureAMQPAcceptorParameters(Map<String, Object> params) {
+ if (!useOverride) {
+ params.put("amqpIdleTimeout", "0");
+ }
+ }
+
+
+ @Test(timeout = 60000)
+ public void testBrokerSendsHalfConfiguredIdleTimeout() throws Exception {
--- End diff --
The name of the test doesn't appear to match what is being tested here so I'd name it something that actually describes that to avoid confusing folks.
---
[GitHub] activemq-artemis pull request #2135: ARTEMIS-1924 Add amqpIdleTimeout
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/2135#discussion_r194569421
--- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpNoHearbeatsTest.java ---
@@ -0,0 +1,83 @@
+/*
+ * 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.amqp;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Map;
+
+import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.transport.amqp.client.AmqpClient;
+import org.apache.activemq.transport.amqp.client.AmqpConnection;
+import org.apache.activemq.transport.amqp.client.AmqpValidator;
+import org.apache.qpid.proton.engine.Connection;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+@RunWith(Parameterized.class)
+public class AmqpNoHearbeatsTest extends AmqpClientTestSupport {
+
+ @Parameterized.Parameters(name = "useOverride={0}")
+ public static Collection<Object[]> parameters() {
+ return Arrays.asList(new Object[][] {
+ {true}, {false}
+ });
+ }
+
+ @Parameterized.Parameter(0)
+ public boolean useOverride;
+
+ @Override
+ protected void addConfiguration(ActiveMQServer server) {
+ if (useOverride) {
+ server.getConfiguration().setConnectionTTLOverride(0);
+ } else {
+ server.getConfiguration().setConnectionTtlCheckInterval(500);
+ }
+ }
+
+
+ @Override
+ protected void configureAMQPAcceptorParameters(Map<String, Object> params) {
+ if (!useOverride) {
+ params.put("amqpIdleTimeout", "0");
+ }
+ }
+
+
+ @Test(timeout = 60000)
+ public void testBrokerSendsHalfConfiguredIdleTimeout() throws Exception {
--- End diff --
ouch.. you're right.. and I missed it.. I will rename right away.
the joy of copy & paste
---
[GitHub] activemq-artemis pull request #2135: ARTEMIS-1924 Add amqpIdleTimeout
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/activemq-artemis/pull/2135
---
[GitHub] activemq-artemis pull request #2135: ARTEMIS-1924 Add amqpIdleTimeout
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/2135#discussion_r194569617
--- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpNoHearbeatsTest.java ---
@@ -0,0 +1,83 @@
+/*
+ * 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.amqp;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Map;
+
+import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.transport.amqp.client.AmqpClient;
+import org.apache.activemq.transport.amqp.client.AmqpConnection;
+import org.apache.activemq.transport.amqp.client.AmqpValidator;
+import org.apache.qpid.proton.engine.Connection;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+@RunWith(Parameterized.class)
+public class AmqpNoHearbeatsTest extends AmqpClientTestSupport {
+
+ @Parameterized.Parameters(name = "useOverride={0}")
+ public static Collection<Object[]> parameters() {
+ return Arrays.asList(new Object[][] {
+ {true}, {false}
+ });
+ }
+
+ @Parameterized.Parameter(0)
+ public boolean useOverride;
+
+ @Override
+ protected void addConfiguration(ActiveMQServer server) {
+ if (useOverride) {
+ server.getConfiguration().setConnectionTTLOverride(0);
+ } else {
+ server.getConfiguration().setConnectionTtlCheckInterval(500);
+ }
+ }
+
+
+ @Override
+ protected void configureAMQPAcceptorParameters(Map<String, Object> params) {
+ if (!useOverride) {
+ params.put("amqpIdleTimeout", "0");
+ }
+ }
+
+
+ @Test(timeout = 60000)
+ public void testBrokerSendsHalfConfiguredIdleTimeout() throws Exception {
--- End diff --
will call it testHeartless :)
---
[GitHub] activemq-artemis issue #2135: ARTEMIS-1924 Add amqpIdleTimeout
Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on the issue:
https://github.com/apache/activemq-artemis/pull/2135
Code looks good. Add a paragraph to the docs and it should be good to go.
---