geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [05/52] [abbrv] incubator-geode git commit: GEODE-819: Move dunit to com.gemstone.gemfire.test.dunit
Date Fri, 29 Jan 2016 01:16:22 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
index 1c2933d..9bce503 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
@@ -25,9 +25,9 @@ import com.gemstone.gemfire.internal.FileUtil;
 import com.gemstone.gemfire.internal.logging.LogWriterImpl;
 import com.gemstone.gemfire.management.cli.Result;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
-import dunit.Host;
-import dunit.SerializableRunnable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 import java.io.File;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java
index da12c6e..11c3afd 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart4DUnitTest.java
@@ -24,9 +24,9 @@ import com.gemstone.gemfire.internal.FileUtil;
 import com.gemstone.gemfire.internal.logging.LogWriterImpl;
 import com.gemstone.gemfire.management.cli.Result;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
-import dunit.Host;
-import dunit.SerializableRunnable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 import java.io.File;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
index e9a4666..78540ac 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
@@ -29,10 +29,10 @@ import com.gemstone.gemfire.management.cli.Result;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-import dunit.DistributedTestCase;
-import dunit.Host;
-import dunit.SerializableRunnable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 import java.io.File;
 import java.io.FileOutputStream;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
index adf5b5f..b937fa9 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
@@ -34,11 +34,12 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
 import com.gemstone.gemfire.management.internal.configuration.SharedConfigurationDUnitTest;
 import com.gemstone.gemfire.management.internal.configuration.domain.Configuration;
-import dunit.DistributedTestCase;
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.SerializableRunnable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
+
 import org.apache.commons.io.FileUtils;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
index 2d67129..7a72865 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
@@ -32,10 +32,10 @@ import com.gemstone.gemfire.management.internal.cli.CliUtil;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.remote.CommandProcessor;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.SerializableRunnable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 import java.io.File;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
index a69c35a..d09e596 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
@@ -35,10 +35,10 @@ import com.gemstone.gemfire.management.cli.Result.Status;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.remote.CommandProcessor;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.SerializableRunnable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 import javax.management.ObjectName;
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
index d1dc87f..b0f0495 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
@@ -21,9 +21,9 @@ import com.gemstone.gemfire.management.cli.Result.Status;
 import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-import dunit.Host;
-import dunit.SerializableRunnable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 import java.io.File;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
index 3a8811d..dcbba2f 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
@@ -23,8 +23,9 @@ import com.gemstone.gemfire.internal.FileUtil;
 import com.gemstone.gemfire.management.cli.Result;
 import com.gemstone.gemfire.management.internal.cli.CommandManager;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
-import dunit.Host;
-import dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+
 import org.junit.Test;
 
 import java.io.File;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
index bea79cf..894d2ec 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
@@ -49,12 +49,11 @@ import com.gemstone.gemfire.management.internal.configuration.domain.XmlEntity.X
 import com.gemstone.gemfire.management.internal.configuration.handlers.ConfigurationRequestHandler;
 import com.gemstone.gemfire.management.internal.configuration.messages.ConfigurationRequest;
 import com.gemstone.gemfire.management.internal.configuration.messages.ConfigurationResponse;
-
-import dunit.DistributedTestCase;
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.SerializableRunnable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 /***
  * Tests the starting up of shared configuration, installation of {@link ConfigurationRequestHandler}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java
index 65f3243..b096bd8 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java
@@ -37,13 +37,12 @@ import com.gemstone.gemfire.management.CacheServerMXBean;
 import com.gemstone.gemfire.management.MBeanUtil;
 import com.gemstone.gemfire.management.ManagementTestBase;
 import com.gemstone.gemfire.management.internal.cli.CliUtil;
-
-import dunit.DistributedTestCase;
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.SerializableRunnable;
-import dunit.VM;
-import dunit.DistributedTestCase.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase.WaitCriterion;
 
 /**
  * This is for testing client IDs

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestFunctionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestFunctionsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestFunctionsDUnitTest.java
index c80a093..1ebbab7 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestFunctionsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestFunctionsDUnitTest.java
@@ -24,8 +24,8 @@ import com.gemstone.gemfire.internal.cache.functions.TestFunction;
 import com.gemstone.gemfire.management.DistributedSystemMXBean;
 import com.gemstone.gemfire.management.ManagementService;
 import com.gemstone.gemfire.management.ManagementTestBase;
-import dunit.SerializableRunnable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 /**
  * This is for testing running functions

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestHeapDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestHeapDUnitTest.java
index f90d7dd..4a8783a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestHeapDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestHeapDUnitTest.java
@@ -19,8 +19,7 @@ package com.gemstone.gemfire.management.internal.pulse;
 import com.gemstone.gemfire.management.DistributedSystemMXBean;
 import com.gemstone.gemfire.management.ManagementService;
 import com.gemstone.gemfire.management.ManagementTestBase;
-
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.VM;
 
 /**
  * This is for testing heap size from Mbean  

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java
index 9ba0e2c..56fcbb1 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java
@@ -37,11 +37,11 @@ import com.gemstone.gemfire.management.DistributedRegionMXBean;
 import com.gemstone.gemfire.management.DistributedSystemMXBean;
 import com.gemstone.gemfire.management.ManagementService;
 import com.gemstone.gemfire.management.ManagementTestBase;
-import dunit.DistributedTestCase;
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.SerializableRunnable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 /**
  * This is for testing subscriptions

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
index 9dc9faa..0704121 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
@@ -56,11 +56,10 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
 import com.gemstone.gemfire.internal.cache.tier.sockets.command.Put70;
 import com.gemstone.gemfire.internal.cache.versions.VMVersionTag;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
-
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.SerializableRunnable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 /**
  * @author dsmith

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
index da5f0c7..5a355ea 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
@@ -24,11 +24,10 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionManager;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
-
-import dunit.DistributedTestCase;
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 /**
  * @author dsmith

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
index 68c3f1d..a8b4e8d 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
@@ -40,12 +40,10 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.VM;
-
 import com.gemstone.gemfire.pdx.internal.json.PdxToJSON;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.util.test.TestUtil;
 
 import org.json.JSONException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PDXAsyncEventQueueDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PDXAsyncEventQueueDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PDXAsyncEventQueueDUnitTest.java
index 860ab22..a4b81cb 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PDXAsyncEventQueueDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PDXAsyncEventQueueDUnitTest.java
@@ -33,10 +33,9 @@ import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
 import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.Version;
-
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 public class PDXAsyncEventQueueDUnitTest extends CacheTestCase {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java
index 219429b..98da0fc 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java
@@ -41,11 +41,10 @@ import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.PdxSerializerObject;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.pdx.internal.AutoSerializableManager;
-
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.SerializableRunnable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 /**
  * @author dsmith

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxDeserializationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxDeserializationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxDeserializationDUnitTest.java
index ee8251d..3310d95 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxDeserializationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxDeserializationDUnitTest.java
@@ -38,11 +38,10 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.pdx.PdxReader;
 import com.gemstone.gemfire.pdx.PdxSerializable;
 import com.gemstone.gemfire.pdx.PdxWriter;
-
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.SerializableRunnable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 /**
  * A test to ensure that we do not deserialize PDX objects

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableDUnitTest.java
index 188caaa..51635f3 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableDUnitTest.java
@@ -24,11 +24,10 @@ import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.pdx.internal.PeerTypeRegistration;
-
-import dunit.AsyncInvocation;
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 public class PdxSerializableDUnitTest extends CacheTestCase {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxTypeExportDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxTypeExportDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxTypeExportDUnitTest.java
index fa38b7f..001aab4 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxTypeExportDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/PdxTypeExportDUnitTest.java
@@ -35,9 +35,8 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.pdx.internal.EnumInfo;
 import com.gemstone.gemfire.pdx.internal.PdxType;
 import com.gemstone.gemfire.pdx.internal.TypeRegistry;
-
-import dunit.Host;
-import dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
 
 public class PdxTypeExportDUnitTest extends CacheTestCase {
   public PdxTypeExportDUnitTest(String name) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/VersionClassLoader.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/VersionClassLoader.java b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/VersionClassLoader.java
index 7f06843..be4d9c7 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/VersionClassLoader.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/VersionClassLoader.java
@@ -20,26 +20,12 @@
  */
 package com.gemstone.gemfire.pdx;
 
-import com.gemstone.gemfire.InternalGemFireException;
-import com.gemstone.gemfire.SerializationException;
-import com.gemstone.gemfire.cache.client.ServerOperationException;
-import com.gemstone.gemfire.pdx.PdxInstance;
-import com.gemstone.gemfire.util.test.TestUtil;
-
-import dunit.*;
-
 import java.io.File;
-import java.io.IOException;
 import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.List;
 
-import junit.framework.Assert;
-import util.TestException;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 
 public class VersionClassLoader {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
index 477e0f9..28e2940 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
@@ -23,12 +23,11 @@ import redis.clients.jedis.Jedis;
 import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.SocketCreator;
-
-import dunit.AsyncInvocation;
-import dunit.DistributedTestCase;
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.VM;
 
 public class RedisDistDUnitTest extends DistributedTestCase {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
index e9a546f..40acd62 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
@@ -25,10 +25,9 @@ import com.gemstone.gemfire.cache.RegionShortcut;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
-
-import dunit.DistributedTestCase;
-import dunit.Host;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.VM;
 
 public class RestAPITestBase extends DistributedTestCase {
   private static final long serialVersionUID = 1L;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java
index f3a6dd3..ccdf782 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java
@@ -30,10 +30,10 @@ import security.CredentialGenerator.ClassCode;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.VM;
 
-import dunit.DistributedTestCase;
-import dunit.Host;
-import dunit.VM;
 import security.DummyCredentialGenerator;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
index b44ac33..c434a2a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
@@ -33,10 +33,10 @@ import security.XmlAuthzCredentialGenerator;
 
 import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
 import com.gemstone.gemfire.internal.AvailablePort;
-import templates.security.UserPasswordAuthInit;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.VM;
 
-import dunit.Host;
-import dunit.VM;
+import templates.security.UserPasswordAuthInit;
 
 /**
  * Tests for authorization from client to server. This tests for authorization

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
index e49f9ff..4796203 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
@@ -59,9 +59,9 @@ import com.gemstone.gemfire.internal.AvailablePort.Keeper;
 import com.gemstone.gemfire.internal.cache.AbstractRegionEntry;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.util.Callable;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.VM;
 
-import dunit.DistributedTestCase;
-import dunit.VM;
 import security.DummyCredentialGenerator;
 import security.XmlAuthzCredentialGenerator;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java
index 627c415..9120a1f 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java
@@ -34,8 +34,7 @@ import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.execute.PRClientServerTestBase;
 import com.gemstone.gemfire.internal.cache.functions.TestFunction;
-
-import dunit.Host;
+import com.gemstone.gemfire.test.dunit.Host;
 
 public class ClientMultiUserAuthzDUnitTest extends ClientAuthorizationTestBase {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java
index 37b46cc..42fe897 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java
@@ -32,8 +32,7 @@ import com.gemstone.gemfire.cache.client.NoAvailableServersException;
 import com.gemstone.gemfire.cache.client.ServerConnectivityException;
 import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionLocalMaxMemoryDUnitTest.TestObject1;
-
-import dunit.Host;
+import com.gemstone.gemfire.test.dunit.Host;
 
 /**
  * @since 6.1

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java
index 0a0a0b8..94b603e 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java
@@ -40,9 +40,8 @@ import com.gemstone.gemfire.cache.query.CqException;
 import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.util.Callable;
-
-import dunit.Host;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.VM;
 
 /**
  * @since 6.1

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
index e4ce211..2ff0b2e 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
@@ -38,10 +38,9 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
 import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
 import com.gemstone.gemfire.internal.AvailablePort;
-
-import dunit.DistributedTestCase;
-import dunit.Host;
-import dunit.VM;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.VM;
 
 /**
  * Tests peer to peer authentication in Gemfire

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/security/SecurityTestUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/security/SecurityTestUtil.java b/gemfire-core/src/test/java/com/gemstone/gemfire/security/SecurityTestUtil.java
index 6cb515a..2ac470c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/security/SecurityTestUtil.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/security/SecurityTestUtil.java
@@ -78,8 +78,7 @@ import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.PureLogWriter;
 import com.gemstone.gemfire.internal.util.Callable;
-
-import dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 
 /**
  * Contains utility methods for setting up servers/clients for authentication

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/AsyncInvocation.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/AsyncInvocation.java b/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/AsyncInvocation.java
new file mode 100644
index 0000000..f6cc88f
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/AsyncInvocation.java
@@ -0,0 +1,215 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.test.dunit;
+
+import java.util.concurrent.TimeoutException;
+
+import com.gemstone.gemfire.InternalGemFireError;
+import com.gemstone.gemfire.SystemFailure;
+
+// @todo davidw Add the ability to get a return value back from the
+// async method call.  (Use a static ThreadLocal field that is
+// accessible from the Runnable used in VM#invoke)
+/**
+ * <P>An <code>AsyncInvocation</code> represents the invocation of a
+ * remote invocation that executes asynchronously from its caller.  An
+ * instanceof <code>AsyncInvocation</code> provides information about
+ * the invocation such as any exception that it may have thrown.</P>
+ *
+ * <P>Because it is a <code>Thread</code>, an
+ * <code>AsyncInvocation</code> can be used as follows:</P>
+ *
+ * <PRE>
+ *   AsyncInvocation ai1 = vm.invokeAsync(Test.class, "method1");
+ *   AsyncInvocation ai2 = vm.invokeAsync(Test.class, "method2");
+ *
+ *   ai1.join();
+ *   ai2.join();
+ *
+ *   assertTrue("Exception occurred while invoking " + ai1,
+ *              !ai1.exceptionOccurred());
+ *   if (ai2.exceptionOccurred()) {
+ *     throw ai2.getException();
+ *   }
+ * </PRE>
+ *
+ * @see VM#invokeAsync(Class, String)
+ */
+public class AsyncInvocation extends Thread {
+  
+  private static final ThreadLocal returnValue = new ThreadLocal();
+
+  /** The singleton the thread group */
+  private static final ThreadGroup GROUP = new AsyncInvocationGroup();
+
+  ///////////////////// Instance Fields  /////////////////////
+
+  /** An exception thrown while this async invocation ran */
+  protected volatile Throwable exception;
+
+  /** The object (or class) that is the receiver of this asyn method
+   * invocation */
+  private Object receiver;
+
+  /** The name of the method being invoked */
+  private String methodName;
+  
+  /** The returned object if any */
+  public volatile Object returnedObj = null;
+
+  //////////////////////  Constructors  //////////////////////
+
+  /**
+   * Creates a new <code>AsyncInvocation</code>
+   *
+   * @param receiver
+   *        The object or {@link Class} on which the remote method was
+   *        invoked
+   * @param methodName
+   *        The name of the method being invoked
+   * @param work
+   *        The actual invocation of the method
+   */
+  public AsyncInvocation(Object receiver, String methodName, Runnable work) {
+    super(GROUP, work, getName(receiver, methodName));
+    this.receiver = receiver;
+    this.methodName = methodName;
+    this.exception = null;
+  }
+
+  //////////////////////  Static Methods  /////////////////////
+
+  /**
+   * Returns the name of a <code>AsyncInvocation</code> based on its
+   * receiver and method name.
+   */
+  private static String getName(Object receiver, String methodName) {
+    StringBuffer sb = new StringBuffer(methodName);
+    sb.append(" invoked on ");
+    if (receiver instanceof Class) {
+      sb.append("class ");
+      sb.append(((Class) receiver).getName());
+
+    } else {
+      sb.append("an instance of ");
+      sb.append(receiver.getClass().getName());
+    }
+
+    return sb.toString();
+  }
+
+  /////////////////////  Instance Methods  ////////////////////
+
+  /**
+   * Returns the receiver of this async method invocation
+   */
+  public Object getReceiver() {
+    return this.receiver;
+  }
+
+  /**
+   * Returns the name of the method being invoked remotely
+   */
+  public String getMethodName() {
+    return this.methodName;
+  }
+
+  /**
+   * Returns whether or not an exception occurred during this async
+   * method invocation.
+   */
+  public boolean exceptionOccurred() {
+    if (this.isAlive()) {
+      throw new InternalGemFireError("Exception status not available while thread is alive.");
+    }
+    return this.exception != null;
+  }
+
+  /**
+   * Returns the exception that was thrown during this async method
+   * invocation.
+   */
+  public Throwable getException() {
+    if (this.isAlive()) {
+      throw new InternalGemFireError("Exception status not available while thread is alive.");
+    }
+    if (this.exception instanceof RMIException) {
+      return ((RMIException) this.exception).getCause();
+
+    } else {
+      return this.exception;
+    }
+  }
+
+  //////////////////////  Inner Classes  //////////////////////
+
+  /**
+   * A <code>ThreadGroup</code> that notices when an exception occurrs
+   * during an <code>AsyncInvocation</code>.
+   */
+  private static class AsyncInvocationGroup extends ThreadGroup {
+    AsyncInvocationGroup() {
+      super("Async Invocations");
+    }
+
+    public void uncaughtException(Thread t, Throwable e) {
+      if (e instanceof VirtualMachineError) {
+        SystemFailure.setFailure((VirtualMachineError)e); // don't throw
+      }
+      if (t instanceof AsyncInvocation) {
+        ((AsyncInvocation) t).exception = e;
+      }
+    }
+  }
+  
+  public Object getResult() throws Throwable {
+    join();
+    if(this.exceptionOccurred()) {
+      throw new Exception("An exception occured during async invocation", this.exception);
+    }
+    return this.returnedObj;
+  }
+  
+  public Object getResult(long waitTime) throws Throwable {
+    join(waitTime);
+    if(this.isAlive()) {
+      throw new TimeoutException();
+    }
+    if(this.exceptionOccurred()) {
+      throw new Exception("An exception occured during async invocation", this.exception);
+    }
+    return this.returnedObj;
+  }
+
+  public Object getReturnValue() {
+    if (this.isAlive()) {
+      throw new InternalGemFireError("Return value not available while thread is alive.");
+    }
+    return this.returnedObj;
+  }
+  
+  public void run()
+  {
+    super.run();
+    this.returnedObj = returnValue.get();
+    returnValue.set(null);
+  }
+
+  static void setReturnValue(Object v) {
+    returnValue.set(v);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d89038db/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/DUnitEnv.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/DUnitEnv.java b/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/DUnitEnv.java
new file mode 100644
index 0000000..eea2d65
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/test/dunit/DUnitEnv.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * 
+ */
+package com.gemstone.gemfire.test.dunit;
+
+import java.io.File;
+import java.rmi.RemoteException;
+import java.util.Properties;
+
+import com.gemstone.gemfire.test.dunit.standalone.BounceResult;
+
+/**
+ * This class provides an abstraction over the environment
+ * that is used to run dunit. This will delegate to the hydra
+ * or to the standalone dunit launcher as needed.
+ * 
+ * Any dunit tests that rely on hydra configuration should go
+ * through here, so that we can separate them out from depending on hydra
+ * and run them on a different VM launching system.
+ *   
+ * @author dsmith
+ *
+ */
+public abstract class DUnitEnv {
+  
+  public static DUnitEnv instance = null;
+  
+  public static final DUnitEnv get() {
+    if (instance == null) {
+      try {
+        // for tests that are still being migrated to the open-source
+        // distributed unit test framework  we need to look for this
+        // old closed-source dunit environment
+        Class clazz = Class.forName("dunit.hydra.HydraDUnitEnv");
+        instance = (DUnitEnv)clazz.newInstance();
+      } catch (Exception e) {
+        throw new Error("Distributed unit test environment is not initialized");
+      }
+    }
+    return instance;
+  }
+  
+  public static void set(DUnitEnv dunitEnv) {
+    instance = dunitEnv;
+  }
+  
+  public abstract String getLocatorString();
+  
+  public abstract String getLocatorAddress();
+
+  public abstract int getLocatorPort();
+  
+  public abstract Properties getDistributedSystemProperties();
+
+  public abstract int getPid();
+
+  public abstract int getVMID();
+
+  public abstract BounceResult bounce(int pid) throws RemoteException;
+
+  public abstract File getWorkingDirectory(int pid);
+  
+}


Mime
View raw message