This is an automated email from the ASF dual-hosted git repository.

jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/develop by this push:
     new 0196ba5  GEODE-5372: Updated GeodeServer.cs to force kill gfsh if 
necessary
0196ba5 is described below

commit 0196ba5640d3dc2359163e1cbb583e590345ca1c
Author: Mike Martell <[email protected]>
AuthorDate: Mon Jul 2 11:06:07 2018 -0700

    GEODE-5372: Updated GeodeServer.cs to force kill gfsh if necessary
---
 clicache/integration-test2/GeodeServer.cs | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/clicache/integration-test2/GeodeServer.cs 
b/clicache/integration-test2/GeodeServer.cs
index 0b61c6e..877378a 100644
--- a/clicache/integration-test2/GeodeServer.cs
+++ b/clicache/integration-test2/GeodeServer.cs
@@ -108,13 +108,22 @@ public class GeodeServer : IDisposable
         gfsh.Start();
         gfsh.BeginOutputReadLine();
         gfsh.BeginErrorReadLine();
-        gfsh.WaitForExit(60000 * 10);
-
-        Debug.WriteLine("GeodeServer Start: gfsh.HasExited = {0}, 
gfsh.ExitCode = {1}",
-            gfsh.HasExited, gfsh.ExitCode);
-
-        Assert.True(gfsh.HasExited);
-        Assert.Equal(0, gfsh.ExitCode);
+        if (gfsh.WaitForExit(60000)) {
+            Debug.WriteLine("GeodeServer Start: gfsh.HasExited = {0}, 
gfsh.ExitCode = {1}",
+                gfsh.HasExited, gfsh.ExitCode);
+        }
+        else
+        {
+            Debug.WriteLine("GeodeServer Start: gfsh failed to exit, force 
killing.");
+            try
+            {
+                gfsh.Kill();
+            }
+            catch
+            {
+                // ignored
+            }
+        }
     }
 
     public void Dispose()

Reply via email to