You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2016/11/28 13:14:34 UTC

ignite git commit: IGNITE-4322 .NET: Improve timeouts and output in ClientReconnectExample

Repository: ignite
Updated Branches:
  refs/heads/master 7af7a9941 -> 0139ed50c


IGNITE-4322 .NET: Improve timeouts and output in ClientReconnectExample


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

Branch: refs/heads/master
Commit: 0139ed50cb1f44106c9d98033f92bf5e24dbc6a5
Parents: 7af7a99
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Mon Nov 28 16:14:21 2016 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Mon Nov 28 16:14:21 2016 +0300

----------------------------------------------------------------------
 .../Misc/ClientReconnectExample.cs                | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0139ed50/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs
index 55178b6..7ea6e0a 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/ClientReconnectExample.cs
@@ -66,11 +66,10 @@ namespace Apache.Ignite.Examples.Misc
                 {
                     try
                     {
+                        Console.WriteLine(">>> Put value with key: " + i);
                         cache.Put(i, "val" + i);
-                        
-                        Thread.Sleep(500);
 
-                        Console.WriteLine(">>> Put value with key:" + i);
+                        Thread.Sleep(500);
                     }
                     catch (CacheException e)
                     {
@@ -78,11 +77,12 @@ namespace Apache.Ignite.Examples.Misc
 
                         if (disconnectedException != null)
                         {
-                            Console.WriteLine(">>> Client disconnected from the cluster.");
+                            Console.WriteLine(
+                                "\n>>> Client disconnected from the cluster. Failed to put value with key: " + i);
 
                             disconnectedException.ClientReconnectTask.Wait();
 
-                            Console.WriteLine(">>> Client reconnected to the cluster.");
+                            Console.WriteLine("\n>>> Client reconnected to the cluster.");
 
                             // Updating the reference to the cache. The client reconnected to the new cluster.
                             cache = ignite.GetCache<int, string>(CacheName);
@@ -132,7 +132,7 @@ namespace Apache.Ignite.Examples.Misc
             // Start a server node.
             using (var ignite = Ignition.Start(cfg))
             {
-                Console.WriteLine(">>> Server node started.");
+                Console.WriteLine("\n>>> Server node started.");
 
                 // Wait for the client node to join.
                 if (ignite.GetCluster().GetNodes().Count == 1)
@@ -142,10 +142,12 @@ namespace Apache.Ignite.Examples.Misc
                 Thread.Sleep(2000);
             }
 
+            Console.WriteLine("\n>>> Server node stopped.");
+
             // Wait for client to detect the disconnect.
-            Thread.Sleep(5000);
+            Thread.Sleep(15000);
 
-            Console.WriteLine(">>> Restarting server node...");
+            Console.WriteLine("\n>>> Restarting server node...");
 
             // Start the server again.
             using (Ignition.Start(cfg))