You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ja...@apache.org on 2018/01/05 19:51:43 UTC
[geode] branch develop updated: GEODE-4221: Restore the ability to
access the debugging VM. (#1234)
This is an automated email from the ASF dual-hosted git repository.
jasonhuynh pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new 7e42f33 GEODE-4221: Restore the ability to access the debugging VM. (#1234)
7e42f33 is described below
commit 7e42f33ec639c13e8f644a57183b18896a2668d7
Author: Michael "Sarge" Dodge <md...@pivotal.io>
AuthorDate: Fri Jan 5 11:51:40 2018 -0800
GEODE-4221: Restore the ability to access the debugging VM. (#1234)
---
.../geode/test/dunit/standalone/DUnitLauncher.java | 23 ++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/DUnitLauncher.java b/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/DUnitLauncher.java
index f956c6b..ca6a623 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/DUnitLauncher.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/DUnitLauncher.java
@@ -62,7 +62,6 @@ import org.apache.geode.distributed.internal.DistributionConfig;
import org.apache.geode.distributed.internal.InternalLocator;
import org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeave;
import org.apache.geode.internal.AvailablePortHelper;
-import org.apache.geode.internal.Version;
import org.apache.geode.internal.logging.LogService;
import org.apache.geode.test.dunit.DUnitEnv;
import org.apache.geode.test.dunit.Host;
@@ -96,8 +95,19 @@ public class DUnitLauncher {
static int locatorPort;
+ /**
+ * Number of VMs to use during initialization.
+ */
public static final int NUM_VMS = 4;
+
+ /**
+ * VM ID for the VM to use for the debugger.
+ */
private static final int DEBUGGING_VM_NUM = -1;
+
+ /**
+ * VM ID for the VM to use for the locator.
+ */
private static final int LOCATOR_VM_NUM = -2;
static final long STARTUP_TIMEOUT = 120 * 1000;
@@ -484,12 +494,17 @@ public class DUnitLauncher {
}
/**
- * this will not bounce VM to a different version. It will only get the current running VM or
- * launch a new one if not already launched.
+ * Retrieves one of this host's VMs based on the specified VM ID. This will not bounce VM to a
+ * different version. It will only get the current running VM or launch a new one if not already
+ * launched.
+ *
+ * @param n ID of the requested VM; a value of <code>-1</code> will return the controller VM,
+ * which may be useful for debugging.
+ * @return VM for the requested VM ID.
*/
@Override
public VM getVM(int n) {
- if (n < getVMCount()) {
+ if (n < getVMCount() && n != DEBUGGING_VM_NUM) {
VM current = super.getVM(n);
return getVM(current.getVersion(), n);
} else {
--
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].