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/e7515f59 Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/e7515f59 Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/e7515f59 Branch: refs/heads/feature/GEM-1483 Commit: e7515f595cb084d9f17da6f7ffcccc8e567cf884 Parents: 0e6dce7 Author: Bruce Schuchardt <[email protected]> Authored: Thu Jul 13 13:40:53 2017 -0700 Committer: Bruce Schuchardt <[email protected]> Committed: Tue Jul 25 08:19:48 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/e7515f59/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/e7515f59/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}). */
