ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [24/48] ignite git commit: IGNITE-3600 .NET: Fix MessagingTest.TestRemoteListenMultithreaded failure
Date Wed, 03 Aug 2016 11:29:06 GMT
IGNITE-3600 .NET: Fix MessagingTest.TestRemoteListenMultithreaded failure

This closes #906


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fcdb765e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fcdb765e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fcdb765e

Branch: refs/heads/ignite-3443
Commit: fcdb765e2f9d73d0649a4260ed1324fb41f55a3e
Parents: 982ff9e
Author: Pavel Tupitsyn <ptupitsyn@apache.org>
Authored: Thu Jul 28 19:02:14 2016 +0300
Committer: Pavel Tupitsyn <ptupitsyn@apache.org>
Committed: Thu Jul 28 19:02:14 2016 +0300

----------------------------------------------------------------------
 .../Apache.Ignite.Core.Tests/MessagingTest.cs       | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fcdb765e/modules/platforms/dotnet/Apache.Ignite.Core.Tests/MessagingTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/MessagingTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/MessagingTest.cs
index e424426..82c6742 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/MessagingTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/MessagingTest.cs
@@ -384,7 +384,7 @@ namespace Apache.Ignite.Core.Tests
                 // Check that listen/stop work concurrently
                 messaging.StopRemoteListen(messaging.RemoteListen(sharedListener));
 
-            }, threadCnt, runSeconds);
+            }, threadCnt, runSeconds / 2);
 
             MessagingTestHelper.ListenResult = false;
 
@@ -396,15 +396,21 @@ namespace Apache.Ignite.Core.Tests
 
             senders.Wait(); // wait for senders to stop
 
-            var sharedResult = MessagingTestHelper.ReceivedMessages.Count;
+            MessagingTestHelper.ClearReceived(int.MaxValue);
 
-            messaging.Send(NextMessage());
+            var lastMsg = NextMessage();
+            messaging.Send(lastMsg);
 
             Thread.Sleep(MessagingTestHelper.MessageTimeout);
 
             // Check that unsubscription worked properly
-            Assert.AreEqual(sharedResult, MessagingTestHelper.ReceivedMessages.Count);
-            
+            var sharedResult = MessagingTestHelper.ReceivedMessages.ToArray();
+
+            if (sharedResult.Length != 0)
+            {
+                Assert.Fail("Unexpected messages ({0}): {1}; last sent message: {2}", sharedResult.Length,

+                    string.Join(",", sharedResult), lastMsg);
+            }
         }
 
         /// <summary>


Mime
View raw message