-
Bug
-
Resolution: Done
-
Major
-
1.1.0-GA
-
None
In test method AdvancedLinkFlowControl in LinkTests.cs is used groupID in create message for sender. But with groupID test fails, because receiver2 cannot receive messages with groupID, when receiver1 received some of these messages and it is still attached.
public void TestMethod_AdvancedLinkFlowControl() { string testName = "AdvancedLinkFlowControl"; int nMsgs = 20; Connection connection = new Connection(address); Session session = new Session(connection); SenderLink sender = new SenderLink(session, "sender-" + testName, "q1"); for (int i = 0; i < nMsgs; ++i) { Message message = new Message(); message.Properties = new Properties() { MessageId = "msg" + i, GroupId = testName }; sender.Send(message, null, null); } ReceiverLink receiver = new ReceiverLink(session, "receiver-" + testName, "q1"); receiver.SetCredit(2, false); Message m1 = receiver.Receive(); Message m2 = receiver.Receive(); Assert.AreEqual("msg0", m1.Properties.MessageId); Assert.AreEqual("msg1", m2.Properties.MessageId); receiver.Accept(m1); receiver.Accept(m2); ReceiverLink receiver2 = new ReceiverLink(session, "receiver2-" + testName, "q1"); receiver2.SetCredit(2, false); Message m3 = receiver2.Receive(); Message m4 = receiver2.Receive(); Assert.AreEqual("msg2", m3.Properties.MessageId); Assert.AreEqual("msg3", m4.Properties.MessageId); receiver2.Accept(m3); receiver2.Accept(m4); receiver.SetCredit(4); for (int i = 4; i < nMsgs; i++) { Message m = receiver.Receive(); Assert.AreEqual("msg" + i, m.Properties.MessageId); receiver.Accept(m); } sender.Close(); receiver.Close(); receiver2.Close(); session.Close(); connection.Close(); }