You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/11/26 11:01:53 UTC
[32/34] ignite git commit: IGNITE-2000 .Net: Fixed a bug causing
exception in MessagingExample on second run when standalone node exists.
IGNITE-2000 .Net: Fixed a bug causing exception in MessagingExample on second run when standalone node exists.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e386798f
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e386798f
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e386798f
Branch: refs/heads/ignite-1956
Commit: e386798fdf1c4d43afabc24e7206307958265c35
Parents: 446a14b
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Thu Nov 26 12:46:38 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Nov 26 12:46:38 2015 +0300
----------------------------------------------------------------------
.../Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs | 5 ++++-
.../Apache.Ignite.Examples/Messaging/MessagingExample.cs | 9 +++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/e386798f/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
index 087f886..bcf6baa 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
@@ -102,13 +102,16 @@ namespace Apache.Ignite.Core.Tests.Examples
if (example.NeedsTestDll)
args.Add(" -assembly=" + typeof(AverageSalaryJob).Assembly.Location);
- // ReSharper disable once UnusedVariable
var proc = new IgniteProcess(args.ToArray());
Assert.IsTrue(ignite.WaitTopology(i + 2, 30000));
+ Assert.IsTrue(proc.Alive);
}
Ignition.ClientMode = clientMode;
+
+ // Run twice to catch issues with standalone node state
+ example.Run();
example.Run();
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/e386798f/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs
index ad28afe..3c74a42 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs
@@ -72,13 +72,14 @@ namespace Apache.Ignite.Examples.Messaging
var unorderedCounter = new CountdownEvent(msgCount);
localMessaging.LocalListen(new LocalListener(unorderedCounter), Topic.Unordered);
+
localMessaging.LocalListen(new LocalListener(orderedCounter), Topic.Ordered);
// Set up remote listeners
var remoteMessaging = remotes.GetMessaging();
- remoteMessaging.RemoteListen(new RemoteUnorderedListener(), Topic.Unordered);
- remoteMessaging.RemoteListen(new RemoteOrderedListener(), Topic.Ordered);
+ var idUnordered = remoteMessaging.RemoteListen(new RemoteUnorderedListener(), Topic.Unordered);
+ var idOrdered = remoteMessaging.RemoteListen(new RemoteOrderedListener(), Topic.Ordered);
// Send unordered
Console.WriteLine(">>> Sending unordered messages...");
@@ -101,6 +102,10 @@ namespace Apache.Ignite.Examples.Messaging
unorderedCounter.Wait();
orderedCounter.Wait();
+
+ // Unsubscribe
+ remoteMessaging.StopRemoteListen(idUnordered);
+ remoteMessaging.StopRemoteListen(idOrdered);
}
}