Repository: geode
Updated Branches:
  refs/heads/feature/GEODE-3175 66f226823 -> f6ff39145


GEODE-3175 backward-compatibility tests fail with bad classpath

Attempt restart of a VM if it is unavailable.


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

Branch: refs/heads/feature/GEODE-3175
Commit: f6ff39145d5ed83e5729f82ab1c6681c9ae14aa8
Parents: 66f2268
Author: Bruce Schuchardt <bschucha...@pivotal.io>
Authored: Thu Jul 13 13:40:53 2017 -0700
Committer: Bruce Schuchardt <bschucha...@pivotal.io>
Committed: Thu Jul 13 13:45:53 2017 -0700

----------------------------------------------------------------------
 .../src/test/java/org/apache/geode/test/dunit/Host.java   |  4 +++-
 .../src/test/java/org/apache/geode/test/dunit/VM.java     | 10 ++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/f6ff3914/geode-core/src/test/java/org/apache/geode/test/dunit/Host.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/Host.java 
b/geode-core/src/test/java/org/apache/geode/test/dunit/Host.java
index b38b3c7..4cb6992 100755
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/Host.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/Host.java
@@ -163,7 +163,9 @@ public abstract class Host implements Serializable {
       throw new IllegalArgumentException(s);
 
     } else {
-      return (VM) vms.get(n);
+      VM vm = (VM) vms.get(n);
+      vm.makeAvailable();
+      return vm;
     }
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/f6ff3914/geode-core/src/test/java/org/apache/geode/test/dunit/VM.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/VM.java 
b/geode-core/src/test/java/org/apache/geode/test/dunit/VM.java
index 0b188ae..f011330 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/VM.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/VM.java
@@ -60,6 +60,16 @@ public class VM implements Serializable {
   }
 
   /**
+   * restart an unavailable VM
+   */
+  public synchronized void makeAvailable() {
+    if (!this.available) {
+      this.available = true;
+      bounce();
+    }
+  }
+
+  /**
    * Returns the total number of {@code VM}s on all {@code Host}s (note that 
DUnit currently only
    * supports one {@code Host}).
    */

Reply via email to