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 2016/12/05 12:38:25 UTC
[21/52] ignite git commit: IGNITE-4306 .NET: Add diagnostic
information to examples test
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/master
Commit: b04460c6b3ad5891f12a23ad6dc8a08625aad031
Parents: 7b35ba7
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Fri Nov 25 12:11:49 2016 +0300
Committer: Pavel Tupitsyn <pt...@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>