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

ASF GitHub Bot logged work on AMQNET-589:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Jul/19 20:41
            Start Date: 12/Jul/19 20:41
    Worklog Time Spent: 10m 
      Work Description: cjwmorgan-sol commented on pull request #4: AMQNET-589: 
Failover implementation
URL: https://github.com/apache/activemq-nms-amqp/pull/4#discussion_r303141600
 
 

 ##########
 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:
   I find this test fails for me unless I increase the timeout value from 2000 
to about 2800. I also found adding connection.Start before the the 
testAmqpPeer.Close() has the test run in about 0.5 secs.
   
   @HavretGC any ideas thoughts?
 
----------------------------------------------------------------
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: 276137)
    Time Spent: 3h 50m  (was: 3h 40m)

> 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: 3h 50m
>  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)

Reply via email to