ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [08/50] ignite git commit: IGNITE-4306 .NET: Add diagnostic information to examples test
Date Tue, 06 Dec 2016 08:40:05 GMT
IGNITE-4306 .NET: Add diagnostic information to examples test


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

Branch: refs/heads/ignite-comm-balance-master
Commit: b04460c6b3ad5891f12a23ad6dc8a08625aad031
Parents: 7b35ba7
Author: Pavel Tupitsyn <ptupitsyn@apache.org>
Authored: Fri Nov 25 12:11:49 2016 +0300
Committer: Pavel Tupitsyn <ptupitsyn@apache.org>
Committed: Fri Nov 25 12:11:49 2016 +0300

----------------------------------------------------------------------
 .../Examples/ExamplesTest.cs                    |  7 +++-
 .../Process/IgniteProcess.cs                    | 40 ++++++--------------
 2 files changed, 16 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b04460c6/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 8c017d1..61bfb5c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
@@ -92,8 +92,11 @@ namespace Apache.Ignite.Core.Tests.Examples
 
                     var proc = new IgniteProcess(args.ToArray());
 
-                    Assert.IsTrue(ignite.WaitTopology(i + 2));
-                    Assert.IsTrue(proc.Alive);
+                    Assert.IsTrue(ignite.WaitTopology(i + 2), 
+                        string.Format("Standalone node failed to join topology: [{0}]", proc.GetInfo()));
+
+                    Assert.IsTrue(proc.Alive, string.Format("Standalone node stopped unexpectedly:
[{0}]", 
+                        proc.GetInfo()));
                 }
 
                 Ignition.ClientMode = clientMode;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b04460c6/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Process/IgniteProcess.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Process/IgniteProcess.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Process/IgniteProcess.cs
index 852551a..11fe614 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Process/IgniteProcess.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Process/IgniteProcess.cs
@@ -214,6 +214,17 @@ namespace Apache.Ignite.Core.Tests.Process
         }
 
         /// <summary>
+        /// Gets the process.
+        /// </summary>
+        public string GetInfo()
+        {
+            return Alive
+                ? string.Format("Id={0}, Alive={1}", _proc.Id, Alive)
+                : string.Format("Id={0}, Alive={1}, ExitCode={2}, ExitTime={3}",
+                    _proc.Id, Alive, _proc.ExitCode, _proc.ExitTime);
+        }
+
+        /// <summary>
         /// Kill process.
         /// </summary>
         public void Kill()
@@ -249,35 +260,6 @@ namespace Apache.Ignite.Core.Tests.Process
         }
 
         /// <summary>
-        /// Join process with timeout.
-        /// </summary>
-        /// <param name="timeout">Timeout in milliseconds.</param>
-        /// <returns><c>True</c> if process exit occurred before timeout.</returns>
-        public bool Join(int timeout)
-        {
-            return _proc.WaitForExit(timeout);
-        }
-
-        /// <summary>
-        /// Join process with timeout.
-        /// </summary>
-        /// <param name="timeout">Timeout in milliseconds.</param>
-        /// <param name="exitCode">Exit code.</param>
-        /// <returns><c>True</c> if process exit occurred before timeout.</returns>
-        public bool Join(int timeout, out int exitCode)
-        {
-            if (_proc.WaitForExit(timeout))
-            {
-                exitCode = _proc.ExitCode;
-
-                return true;
-            }
-            exitCode = 0;
-
-            return false;
-        }
-
-        /// <summary>
         /// Attach output reader to the process.
         /// </summary>
         /// <param name="proc">Process.</param>


Mime
View raw message