[
https://issues.apache.org/jira/browse/AMQNET-589?focusedWorklogId=276411&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-276411
]
ASF GitHub Bot logged work on AMQNET-589:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 14/Jul/19 19:44
Start Date: 14/Jul/19 19:44
Worklog Time Spent: 10m
Work Description: michaelandrepearce commented on pull request #4:
AMQNET-589: Failover implementation
URL: https://github.com/apache/activemq-nms-amqp/pull/4#discussion_r303258377
##########
File path: test/Apache-NMS-AMQP-Test/Integration/ConnectionIntegrationTest.cs
##########
@@ -0,0 +1,248 @@
+/*
+ * 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.
+ */
+
+using System;
+using Apache.NMS;
+using Apache.NMS.AMQP;
+using Apache.NMS.Util;
+using NMS.AMQP.Test.TestAmqp;
+using NUnit.Framework;
+
+namespace NMS.AMQP.Test.Integration
+{
+ [TestFixture]
+ public class ConnectionIntegrationTest
+ {
+ private static readonly string User = "USER";
+ private static readonly string Password = "PASSWORD";
+ private static readonly string Address = "amqp://127.0.0.1:5672";
+
+ [Test, Timeout(2000)]
+ public void TestCreateAndCloseConnection()
+ {
+ using (TestAmqpPeer testAmqpPeer = new TestAmqpPeer(Address, User,
Password))
+ {
+ testAmqpPeer.Open();
+ NmsConnectionFactory factory = new
NmsConnectionFactory(Address);
+ IConnection connection = factory.CreateConnection(User,
Password);
+ connection.Start();
+ connection.Close();
+ }
+ }
+
+ [Test, Timeout(2000)]
+ public void TestCreateAutoAckSession()
+ {
+ using (TestAmqpPeer testAmqpPeer = new TestAmqpPeer(Address, User,
Password))
+ {
+ testAmqpPeer.Open();
+ NmsConnectionFactory factory = new
NmsConnectionFactory(Address);
+ IConnection connection = factory.CreateConnection(User,
Password);
+ connection.Start();
+ ISession session =
connection.CreateSession(AcknowledgementMode.AutoAcknowledge);
+ Assert.NotNull(session, "Session should not be null");
+ Assert.AreEqual(AcknowledgementMode.AutoAcknowledge,
session.AcknowledgementMode);
+ connection.Close();
+ }
+ }
+
+ [Test, Timeout(2000)]
+ public void TestCreateAutoAckSessionByDefault()
+ {
+ using (TestAmqpPeer testAmqpPeer = new TestAmqpPeer(Address, User,
Password))
+ {
+ testAmqpPeer.Open();
+ NmsConnectionFactory factory = new
NmsConnectionFactory(Address);
+ IConnection connection = factory.CreateConnection(User,
Password);
+ connection.Start();
+ ISession session = connection.CreateSession();
+ Assert.NotNull(session, "Session should not be null");
+ Assert.AreEqual(AcknowledgementMode.AutoAcknowledge,
session.AcknowledgementMode);
+ connection.Close();
+ }
+ }
+
+ [Test, Timeout(2000)]
+ public void TestRemotelyCloseConnectionDuringSessionCreation()
+ {
Review comment:
This is a classical testing issue we have in artemis. Typically we tune the
client or broker (by params) for such tests so they should timeout much faster
thus ensuring test completes fast regardless. Also test timeouts tend to be
60secs thus avoiding issue of someone having a super fast, or super slow
machine
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 276411)
Time Spent: 5h 20m (was: 5h 10m)
> NMS AMQP Failover implementation
> --------------------------------
>
> Key: AMQNET-589
> URL: https://issues.apache.org/jira/browse/AMQNET-589
> Project: ActiveMQ .Net
> Issue Type: Improvement
> Components: ActiveMQ, AMQP, NMS
> Affects Versions: 1.8.0
> Reporter: Krzysztof Porebski
> Priority: Major
> Time Spent: 5h 20m
> Remaining Estimate: 0h
>
> Implement failover in NMS AMQP the same way as it is implemented in QpidJMS.
> This will involve some major rework, as current design is too rigid to
> introduce this feature.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)