geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lgalli...@apache.org
Subject [3/3] incubator-geode git commit: Author: Lise Storc <lstorc@pivotal.io> Date: Thu Jun 4 14:43:01 2015 -0700
Date Thu, 24 Sep 2015 21:06:12 GMT
Author: Lise Storc <lstorc@pivotal.io>
Date:   Thu Jun 4 14:43:01 2015 -0700

    Reunite open and closed source hydra classes and various other test classes.

    This is to remove the hydra dependency on gemfire-core test. Moved some
    classes around and duplicated others as part of reuniting packages.


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

Branch: refs/heads/GEODE-308
Commit: 2efff3f0146ea47f55ec8033b0c8b280546b25f5
Parents: ba74e9e
Author: Lynn Gallinat <lgallinat@pivotal.io>
Authored: Thu Sep 24 09:46:15 2015 -0700
Committer: Lynn Gallinat <lgallinat@pivotal.io>
Committed: Thu Sep 24 09:46:15 2015 -0700

----------------------------------------------------------------------
 .../batterytest/greplogs/ExpectedStrings.java   | 179 ------
 .../java/batterytest/greplogs/LogConsumer.java  | 288 ----------
 .../gemstone/gemfire/TestDataSerializer.java    |   2 +-
 .../com/gemstone/gemfire/UnitTestDoclet.java    |  21 +-
 .../management/MemoryThresholdsDUnitTest.java   |   3 +-
 .../gemfire/cache/query/data/NewPortfolio.java  | 246 +++++++++
 .../gemfire/cache/query/data/NewPosition.java   | 153 ++++++
 ...esourceManagerWithQueryMonitorDUnitTest.java |   3 +-
 .../cache/query/functional/MiscJUnitTest.java   |   2 +-
 .../index/CompactRangeIndexJUnitTest.java       |   2 +-
 .../PRColocatedEquiJoinDUnitTest.java           |   5 +-
 .../query/partitioned/PRQueryDUnitHelper.java   |   6 +-
 .../cache30/CacheSerializableRunnable.java      |   1 -
 .../gemfire/cache30/SearchAndLoadDUnitTest.java |   1 -
 .../gemfire/distributed/internal/LDM.java       |   2 +-
 .../PartitionedRegionTestUtilsDUnitTest.java    |   5 +-
 .../internal/cache/SystemFailureDUnitTest.java  |   3 +-
 .../cache/control/MemoryMonitorJUnitTest.java   |   2 +-
 .../cache/execute/MyTransactionFunction.java    |   2 +-
 .../cache/execute/PRTransactionDUnitTest.java   |   3 +-
 .../cache/ha/HARQueueNewImplDUnitTest.java      |   3 +-
 .../cache/ha/HARegionQueueDUnitTest.java        |   3 +-
 .../PersistentRVVRecoveryDUnitTest.java         |   3 +-
 .../DestroyEntryPropagationDUnitTest.java       |   3 +-
 .../gemfire/pdx/VersionClassLoader.java         |   1 -
 .../src/test/java/dunit/MethExecutor.java       | 384 +++++++++++++
 .../src/test/java/dunit/MethExecutorResult.java | 184 +++++++
 .../src/test/java/dunit/RemoteDUnitVMIF.java    |   2 +-
 .../src/test/java/dunit/TestException.java      |  27 +
 gemfire-core/src/test/java/dunit/VM.java        |   2 -
 .../src/test/java/dunit/standalone/ChildVM.java |  13 -
 .../java/dunit/standalone/DUnitLauncher.java    |  11 +-
 .../java/dunit/standalone/RemoteDUnitVM.java    |   5 +-
 gemfire-core/src/test/java/hydra/GsRandom.java  | 303 ----------
 .../test/java/hydra/HydraRuntimeException.java  |  24 -
 gemfire-core/src/test/java/hydra/Log.java       | 210 -------
 .../src/test/java/hydra/LogVersionHelper.java   |  36 --
 .../src/test/java/hydra/MethExecutor.java       | 383 -------------
 .../src/test/java/hydra/MethExecutorResult.java | 177 ------
 .../src/test/java/hydra/SchedulingOrder.java    |  27 -
 .../src/test/java/hydra/log/AnyLogWriter.java   | 546 -------------------
 .../java/hydra/log/CircularOutputStream.java    | 122 -----
 .../parReg/query/unittest/NewPortfolio.java     | 263 ---------
 .../java/parReg/query/unittest/Position.java    | 154 ------
 .../src/test/java/perffmwk/Formatter.java       | 139 -----
 .../src/test/java/util/TestException.java       |  26 -
 .../test/junit/greplogs/ExpectedStrings.java    | 180 ++++++
 .../test/junit/greplogs/LogConsumer.java        | 289 ++++++++++
 48 files changed, 1508 insertions(+), 2941 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/batterytest/greplogs/ExpectedStrings.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/batterytest/greplogs/ExpectedStrings.java b/gemfire-core/src/test/java/batterytest/greplogs/ExpectedStrings.java
deleted file mode 100644
index 3bb47d4..0000000
--- a/gemfire-core/src/test/java/batterytest/greplogs/ExpectedStrings.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*=========================================================================
- * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * one or more patents listed at http://www.pivotal.io/patents.
- *=========================================================================
- */
-/**
- * 
- */
-package batterytest.greplogs;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.regex.Pattern;
-
-/**
- * @author kbanks
- *
- */
-public class ExpectedStrings {
-
-  private ExpectedStrings() {}
-  
-  public static boolean skipLogMsgs(String type) {
-    if ( type.equals("junit") 
-        || type.equals("java")
-        || type.equals("query") 
-        || type.equals("dunit")) {
-      return true;
-    }else {
-      return false;
-    }    
-  }
-  public static List create(String type) {
-    List expected = new ArrayList();
-
-    expected.add(Pattern.compile("@todo"));
-    expected.add(Pattern.compile("Random seed"));
-    expected.add(Pattern.compile("Caused by"));
-    expected.add(Pattern.compile("continuing test"));
-    expected.add(Pattern.compile("continuing with test"));
-    expected.add(Pattern.compile("Test failed with errors"));
-    expected.add(Pattern.compile("Test reported failure"));
-    expected.add(Pattern.compile("TASK REPORT"));
-    expected.add(Pattern.compile("Test reported hang"));
-    expected.add(Pattern.compile("Proceeding past hung test"));
-    expected.add(Pattern.compile("waited too long for result"));
-    expected.add(Pattern.compile("gskill"));
-    expected.add(Pattern.compile("HANG --"));
-    expected.add(Pattern.compile("Leaving the vms running"));
-    expected.add(Pattern.compile("Non-sanctioned build detected"));
-    expected.add(Pattern.compile("may result in severe civil"));
-    expected.add(Pattern.compile("This concludes your test run"));
-    expected.add(Pattern.compile("TEST:"));
-    expected.add(Pattern.compile("\\(will reattempt\\)"));
-    expected.add(Pattern.compile("Removing disk files"));
-    expected.add(Pattern.compile("cannot find a successor due to shutdown:"));
-    expected.add(Pattern.compile("aborted due to shutdown:"));
-    expected.add(Pattern.compile("due to cache closure:"));
-    expected.add(Pattern.compile("Got expected "));
-    expected.add(Pattern.compile("Caught expected "));
-    expected.add(Pattern.compile("caught expected "));
-    expected.add(Pattern.compile("Found expected warning"));
-    expected.add(Pattern.compile("CacheClosedException: The cache is closed."));
-    expected.add(Pattern.compile("Invoked MembershipNotifierHook"));
-    expected.add(Pattern.compile("java.io.IOException: Connection reset by peer"));
-    expected.add(Pattern.compile("client connections exceeds the licensed limit"));
-    //Exclude this since the only tests with securty enabled, expect to see 
-    //these and if they don't then the test fails
-    expected.add(Pattern.compile("NotAuthorizedException"));
-    expected.add(Pattern.compile("above critical heap threshold"));
-    expected.add(Pattern.compile("below critical heap threshold"));
-    expected.add(Pattern.compile("checkForForcedDisconnect processed Exception"));
-    expected.add(Pattern.compile("operation generated expected \\S+Exception"));
-
-    expected.add(Pattern.compile("ExpectedString")); 
-    expected.add(Pattern.compile("ExpectedStrings")); 
-
-    expected.add(Pattern.compile("PassWithExpectedSevereJUnitTest")); 
-    expected.add(Pattern.compile("FailWithErrorInOutputJUnitTest")); 
-    expected.add(Pattern.compile("PassWithExpectedErrorJUnitTest")); 
-    expected.add(Pattern.compile("FailWithSevereInOutputJUnitTest"));
-    expected.add(Pattern.compile("SystemAlertManager: A simple Alert."));
-    
-    expected.add(Pattern.compile("com.gemstone.gemfire.management.DependenciesNotFoundException")); 
-
-    //expected.add(Pattern.compile("Java version older than"));
-    //expected.add(Pattern.compile("Minimum system requirements not met. Unexpected behavior may result in additional errors."));
-    
-    if ( type.equals("junit") || type.equals("java") || type.equals("query")) {
-      expected.add(Pattern.compile("TEST EXCEPTION"));
-      expected.add(Pattern.compile("testLogLevels"));
-      expected.add(Pattern.compile("On iteration"));
-      expected.add(Pattern.compile("signal count"));  
-      //Remove when davidw fixes
-      expected.add(Pattern.compile("Expected")); 
-      //below here for gfx unit tests
-      expected.add(Pattern.compile("Valid documents must have a"));
-      expected.add(Pattern.compile("Loaded java.lang.ClassCastException"));
-      expected.add(Pattern.compile("Loaded java.io.InvalidClassException"));
-      expected.add(Pattern.compile("Loaded java.lang.NullPointerException"));
-      expected.add(Pattern.compile("Loaded java.lang.ArrayIndexOutOfBoundsException"));
-      expected.add(Pattern.compile("Loaded java.lang.IndexOutOfBoundsException"));
-      expected.add(Pattern.compile("SucessfulTest:"));
-      expected.add(Pattern.compile("SQLException: Database 'newDB' not found"));
-      expected.add(Pattern.compile("SQLException: Database 'newDB1' not found"));
-      expected.add(Pattern.compile("IGNORE_EXCEPTION_test"));
-      expected.add(Pattern.compile("Unsupported at this time"));
-      expected.add(Pattern.compile("DiskAccessException occured as expected"));
-      expected.add(Pattern.compile("Oplog::createOplog:Exception in preblowing the file"));
-    } else if ( type.equals("dunit")) {
-      expected.add(Pattern.compile("INCOMPATIBLE_ROOT"));
-      expected.add(Pattern.compile("connecting to locator"));
-      expected.add(Pattern.compile("ItsOkayForMyClassNotToBeFound"));
-      expected.add(Pattern.compile("Test Exception"));
-      expected.add(Pattern.compile("make sure exceptions from close callbacks"));
-      expected.add(Pattern.compile("Please ignore"));
-      expected.add(Pattern.compile("I have been thrown from TestFunction"));
-      expected.add(Pattern.compile("No admin on"));
-      expected.add(Pattern.compile("nonExistentMethod"));
-      expected.add(Pattern.compile("Expected exception"));
-      expected.add(Pattern.compile("BridgeLoaderTestNonSerializable"));
-      expected.add(Pattern.compile("BridgeLoaderTestSerializableImpl"));
-      expected.add(Pattern.compile("One or more DUnit tests failed"));
-      expected.add(Pattern.compile("ReplyException"));
-      expected.add(Pattern.compile("fine 2"));
-      expected.add(Pattern.compile("TESTING A VERY UNIQUE"));
-      expected.add(Pattern.compile("-01-01"));
-      expected.add(Pattern.compile("testNBRegionDestructionDuringGetInitialImage"));
-      expected.add(Pattern.compile("SQLException: Database 'newDB' not found"));
-      expected.add(Pattern.compile("SQLException: Failed to start database 'newDB'"));
-      expected.add(Pattern.compile("SQLException: Database 'newDB1' not found"));
-      expected.add(Pattern.compile("INCORRECT_localhost"));
-      expected.add(Pattern.compile("WARNING: Failed to check connection: java.net.ConnectException: Connection refused"));
-      expected.add(Pattern.compile("WARNING: Failed to call the method close..:java.rmi.ConnectException:"));
-      expected.add(Pattern.compile("WARNING: Failed to restart: java.rmi.NoSuchObjectException: no such object in table"));
-      expected.add(Pattern.compile("WARNING: Failed to restart: java.rmi.ConnectException: Connection refused to host: .* nested exception is:"));
-      expected.add(Pattern.compile("UnitTests terminating abnormally after a client had a fatal task error"));
-      expected.add(Pattern.compile("Doing stack dump on all"));
-      expected.add(Pattern.compile("Unit test result: FAILED ==> Unsuccessfully ran JUnit tests"));
-      expected.add(Pattern.compile("IGNORE_EXCEPTION_test"));
-      expected.add(Pattern.compile("SIGQUIT received, dumping threads"));
-      expected.add(Pattern.compile("Sleeping \\d+ seconds between stack dumps"));
-      expected.add(Pattern.compile("Redundancy has dropped below"));
-      expected.add(Pattern.compile("Could not find any server to create redundant client"));
-      expected.add(Pattern.compile("Could not find any server to create primary client"));
-      expected.add(Pattern.compile("Pool unexpected closed socket on server"));
-      expected.add(Pattern.compile("Could not initialize a primary queue on startup"));
-      expected.add(Pattern.compile("java.lang.IllegalArgumentException: Sample timestamp must be greater than previous timestamp"));
-      //The following 2 strings are ignored due to bug 52042
-      expected.add(Pattern.compile("failed accepting client connection"));
-      expected.add(Pattern.compile("Acceptor received unknown communication"));
-    } else if ( type.equals("smoke")) {
-      expected.add(Pattern.compile("Doing stack dump on all"));
-      expected.add(Pattern.compile("SIGQUIT received, dumping threads"));
-      expected.add(Pattern.compile("Sleeping \\d+ seconds between stack dumps"));
-      expected.add(Pattern.compile("Could not find Spring Shell library"));
-    } else if ( type.equals("perf")) {
-      expected.add(Pattern.compile("Doing stack dump on all"));
-      expected.add(Pattern.compile("SIGQUIT received, dumping threads"));
-      expected.add(Pattern.compile("Sleeping \\d+ seconds between stack dumps"));
-    } else if ( type.equals("moresmoke")) {
-      expected.add(Pattern.compile(" expected error"));
-      expected.add(Pattern.compile("Doing stack dump on all"));
-      expected.add(Pattern.compile("SIGQUIT received, dumping threads"));
-      expected.add(Pattern.compile("Sleeping \\d+ seconds between stack dumps"));
-    } else {
-      expected.add(Pattern.compile("runbattery\\(\\) returned false"));
-      expected.add(Pattern.compile(" expected error"));
-      expected.add(Pattern.compile("Doing stack dump on all"));
-      expected.add(Pattern.compile("SIGQUIT received, dumping threads"));
-      expected.add(Pattern.compile("Sleeping \\d+ seconds between stack dumps"));
-      expected.add(Pattern.compile("HydraTask_initializeExpectException"));
-      expected.add(Pattern.compile("java.net.ConnectException: Connection refused"));
-    }
-    return expected;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/batterytest/greplogs/LogConsumer.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/batterytest/greplogs/LogConsumer.java b/gemfire-core/src/test/java/batterytest/greplogs/LogConsumer.java
deleted file mode 100644
index 8f243d0..0000000
--- a/gemfire-core/src/test/java/batterytest/greplogs/LogConsumer.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*=========================================================================
- * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * one or more patents listed at http://www.pivotal.io/patents.
- *=========================================================================
- */
-package batterytest.greplogs;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class LogConsumer {
-  private final List expectedExceptions = new ArrayList();
-  private boolean skipLogMsgs = false;
-  private boolean infoMsgFlag = false;
-  private int eatLines = 0;
-  private boolean tmpErrFlag = false;
-  private int tmpErrLines = 0;
-  private boolean saveFlag = false;
-  private int savelinenum = 0;
-  private final List testExpectStrs;
-  StringBuilder all = null;
-  private int lineNumber;
-  private String fileName;
-  HashMap individalErrorCount = new HashMap();
-  private final int repeatLimit;
-  
-  private static final Pattern ExpectedExceptionPattern = Pattern.compile("<ExpectedException action=(add|remove)>(.*)</ExpectedException>");
-  private static final Pattern logPattern = Pattern.compile("^\\[(?:fatal|error|warn|info|debug|trace|severe|warning|fine|finer|finest)");
-  private static final Pattern blankPattern = Pattern.compile("^\\s*$");
-  private static final Pattern infoOrBelowPattern = Pattern.compile("^\\[(?:info|debug|trace|fine|finer|finest)");
-  private static final Pattern fatalOrErrorPattern = Pattern.compile("^\\[(?:fatal|error|severe)");
-  private static final Pattern causedByPattern = Pattern.compile("Caused by");
-  private static final Pattern shortErrPattern = Pattern.compile("^\\[[^\\]]+\\](.*)$", Pattern.MULTILINE | Pattern.DOTALL);
-  private static final Pattern wroteExceptionPattern = Pattern.compile("\\[debug.*Wrote exception:");
-  private static final Pattern rmiWarnPattern = Pattern.compile("^WARNING: Failed to .*java.rmi.ConnectException: Connection refused to host: .*; nested exception is:");
-  private static final Pattern javaLangErrorPattern = Pattern.compile("^java\\.lang\\.\\S+Error$");
-  private static final Pattern exceptionPattern = Pattern.compile("Exception:");
-  private static final Pattern exceptionPattern2 = Pattern.compile("( [\\w\\.]+Exception: (([\\S]+ ){0,6}))");
-  private static final Pattern exceptionPattern3 = Pattern.compile("( [\\w\\.]+Exception)$");
-  private static final Pattern exceptionPattern4 = Pattern.compile("^([^:]+: (([\\w\"]+ ){0,6}))");
-  private static final Pattern misformatedI18nMessagePattern = Pattern.compile("[^\\d]\\{\\d+\\}");
-  private static final Pattern rvvBitSetMessagePattern = Pattern.compile("RegionVersionVector.+bsv\\d+.+bs=\\{\\d+\\}");
-  /** Limit long errors to this many lines */
-  private static int ERROR_BUFFER_LIMIT = 50;
-  
-  
-  
-  
-  public LogConsumer(boolean skipLogMsgs, 
-      List testExpectStrs, String fileName, int repeatLimit) {
-    super();
-    this.skipLogMsgs = skipLogMsgs;
-    this.testExpectStrs = testExpectStrs;
-    this.fileName = fileName;
-    this.repeatLimit = repeatLimit;
-  }
-
-  public StringBuilder consume(CharSequence line) {
-    {
-      lineNumber++;
-      Matcher m = ExpectedExceptionPattern.matcher(line);
-      if (m.find()) {
-        if ( m.group(1).equals("add")) {
-          expectedExceptions.add(Pattern.compile(m.group(2)));
-        } else {
-          //assume add and remove are the only choices
-          expectedExceptions.remove(Pattern.compile(m.group(2)));
-        }
-        return null;
-      }
-    }
-    if(skipLogMsgs) {
-      if(infoMsgFlag) {
-        if(logPattern.matcher(line).find()) {
-          infoMsgFlag = false;
-        } else if (blankPattern.matcher(line).matches()) {
-          infoMsgFlag = false;
-          return null;
-        } else {
-          return null;
-        }
-      }
-      if (infoOrBelowPattern.matcher(line).find()){
-        infoMsgFlag = true;
-        return null;
-      }
-    }
-    
-    if ( eatLines != 0 ) {
-      eatLines--;
-      return null;
-    } else {
-      if(saveFlag || fatalOrErrorPattern.matcher(line).find()) {
-        if(! saveFlag) {
-          saveFlag = true;
-          tmpErrFlag = true;   
-          if(checkExpectedStrs(line, expectedExceptions)) {
-            saveFlag = false;
-            tmpErrFlag = false;
-            tmpErrLines = 0;
-          }
-          if(tmpErrFlag) {
-            tmpErrLines=1;
-            all = new StringBuilder(line);
-            all.append("\n");
-            savelinenum = lineNumber;
-          }
-        } else {
-          if (causedByPattern.matcher(line).find()) {
-            tmpErrFlag = false;
-            tmpErrLines = 0;
-            saveFlag = false;
-            StringBuilder buffer = new StringBuilder();
-            buffer.append("-----------------------------------------------------------------------\n");
-            buffer.append("Found suspect string in ")
-                   .append(fileName)
-                   .append(" at line ")
-                   .append(savelinenum).append("\n\n")
-                   .append(all.toString());
-            return buffer;
-          } else if (checkExpectedStrs(line, expectedExceptions)) {
-            // reset the counters and throw it all away if it matches 
-            // one of the registered ignorable strings
-            tmpErrFlag = false;
-            tmpErrLines = 0;
-            saveFlag = false; 
-          }
-          
-          // We save all the lines up to the next blank line so we're
-          //looking for a blank line here
-          if (blankPattern.matcher(line).matches()) {
-            // we found a blank line so print the suspect string
-            // and reset the savetag flag
-            saveFlag = false;
-            Matcher m = shortErrPattern.matcher(all.toString());
-            if (m.matches()) {
-              String shortName = m.group(1);
-              Integer i = (Integer) individalErrorCount.get(shortName);
-              Integer occurances = 
-                new Integer((i == null) ? 1 : i.intValue() + 1);
-              individalErrorCount.put(shortName, occurances);
-              return enforceErrorLimit(occurances.intValue(), 
-                                all.toString(), 
-                                //reader.getLineNumber(),
-                                savelinenum,
-                                fileName);
-              
-            } else {
-              //error in determining shortName, wing it
-              return enforceErrorLimit(1, 
-                                all.toString(), 
-                                lineNumber,
-                                fileName);
-            }
-          }
-          
-          // we're still saving lines to append them on to all which contains
-          // all the lines we're trying to save          
-          if ( tmpErrFlag ) {
-            if ( tmpErrLines < ERROR_BUFFER_LIMIT ) {
-              tmpErrLines++;
-              all.append(line).append("\n");
-            }
-            if ( tmpErrLines == ERROR_BUFFER_LIMIT ) {
-              tmpErrLines++; //increment to prevent this line from repeating
-              all.append("GrepLogs: ERROR_BUFFER_LIMIT limit reached,")
-                 .append(" the error was too long to display completely.\n");
-            }
-            
-          }
-        }
-      // unique condition for when bridge server see log exception and      
-      // logging level is set to fine. Message looks like this:
-      //[fine 2005/10/25 17:53:13.586 PDT gemfire2 Server connection from hobbes.gemstone.com:34466-0xf4 nid=0x23e40f1] Server connection from hobbes.gemstone.com:34466: Wrote exception:
-      //com.gemstone.gemfire.cache.EntryNotFoundException: remote-destroy-key
-      // also now handles a JMX WARNING
-      } else if(wroteExceptionPattern.matcher(line).find() 
-                || rmiWarnPattern.matcher(line).find()) {
-        //Eat only the single EntryNotFound Exception
-        eatLines=1;
-        // if we are here then the line didn't have severe or error in it and      
-        // didn't meet any special cases that require eating lines      
-        // Check for other kinds of exceptions. This is by no means inclusive      
-        //of all types of exceptions that could occur and some ARE missed.               
-      } else if (exceptionPattern.matcher(line).find()
-                 || javaLangErrorPattern.matcher(line).find()
-                 || (misformatedI18nMessagePattern.matcher(line).find()
-                     && !(infoOrBelowPattern.matcher(line).find()
-                         && rvvBitSetMessagePattern.matcher(line).find())) ) {
-        if(! checkExpectedStrs(line, expectedExceptions)) {
-          // it's the Exception colon that we want to find
-          // along with the next six words and define to shortline
-          // shortline is only used for the unique sting to count the
-          // number of times an exception match occurs. This is so
-          // we can suppress further printing if we hit the limit
-          Matcher m2 = exceptionPattern2.matcher(line);
-          Matcher m3 = exceptionPattern3.matcher(line);
-          Matcher m4 = exceptionPattern4.matcher(line);
-          String shortName = "";
-           
-          if(m2.find()) {
-            shortName = m2.group(1);
-          } else if (m3.find()) {
-            shortName = m3.group(1);
-          } else if (m4.find()) {
-            shortName = m4.group(1);
-          }
-          Integer i = (Integer) individalErrorCount.get(shortName);
-          Integer occurances = 
-            new Integer((i == null) ? 1 : i.intValue() + 1);
-          individalErrorCount.put(shortName, occurances);
-          return enforceErrorLimit(occurances.intValue(), 
-                            line + "\n", 
-                            lineNumber,
-                            fileName);
-        }
-      }
-    }
-    
-    return null;
-  }
-  
-  public StringBuilder close() {
-    if(saveFlag) {
-      //  Bug fix for severe that occurs at the end of a log file. Since we
-      // collect lines up to a blank line that never happens this prints the
-      // collection of in process suspect strings if we close the file and
-      // we're still trying to save lines
-      
-      saveFlag = false;
-      StringBuilder buffer = new StringBuilder();
-      buffer.append("\n-----------------------------------------------------------------------\n")
-            .append("Found suspect string in ")
-            .append(fileName)
-            .append(" at line ")
-            .append(savelinenum)
-            .append("\n\n")
-            .append(all);
-      return buffer;
-    }
-    return null;
-  }
-  
-  private boolean checkExpectedStrs(CharSequence line, List expectedExceptions) {
-    for(int i = 0; i < expectedExceptions.size(); i++) {
-      Pattern p = (Pattern) expectedExceptions.get(i);
-      if(p.matcher(line).find()) return true;
-    }
-    for(int i = 0; i < testExpectStrs.size(); i++) {
-      Pattern p = (Pattern) testExpectStrs.get(i);
-      if(p.matcher(line).find()) return true;
-    }
-    return false;
-  }
-  
-  private StringBuilder enforceErrorLimit(int hits, 
-      String line,
-      int linenum,
-      String filename) {
-    if ( hits <= repeatLimit ) {
-      StringBuilder buffer = new StringBuilder();
-      buffer.append("-----------------------------------------------------------------------\n")
-      .append("Found suspect string in ")
-      .append(filename)
-      .append(" at line ")
-      .append(linenum)
-      .append("\n\n")
-      .append(line)
-      .append("\n");
-      return buffer;
-    }
-    if ( hits == repeatLimit ) {
-      StringBuilder buffer = new StringBuilder();
-      buffer.append("\n\nHit occurrence limit of ")
-      .append(hits)
-      .append(" for this string.\n")
-      .append("Further reporting of this type of error will be suppressed.\n");
-      return buffer;
-    }
-    return null;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/TestDataSerializer.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/TestDataSerializer.java b/gemfire-core/src/test/java/com/gemstone/gemfire/TestDataSerializer.java
index 838986b..6ca6c65 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/TestDataSerializer.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/TestDataSerializer.java
@@ -14,7 +14,7 @@ import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 
-import util.TestException;
+import dunit.TestException;
 
 import com.gemstone.gemfire.internal.cache.tier.sockets.DataSerializerPropogationDUnitTest;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/UnitTestDoclet.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/UnitTestDoclet.java b/gemfire-core/src/test/java/com/gemstone/gemfire/UnitTestDoclet.java
index 65f7908..21aa308 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/UnitTestDoclet.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/UnitTestDoclet.java
@@ -12,7 +12,6 @@ import java.io.*;
 import java.text.BreakIterator;
 import java.util.*;
 import junit.framework.TestCase;
-import perffmwk.Formatter;
 
 /**
  * This class is a Javadoc <A
@@ -28,6 +27,22 @@ import perffmwk.Formatter;
  */
 public class UnitTestDoclet {
 
+  /** The width (in characters) of the report output.
+   *
+   * @see #center(String, PrintWriter) */
+  protected static final int WIDTH = 80;
+
+  /**
+   *  Centers the given string on the <code>PrintWriter</code>
+   */
+  public static void center(String s, PrintWriter pw) {
+    int indent = (WIDTH / 2) - (s.length() / 2);
+    for (int i = 0; i < indent; i++) {
+      pw.print(" ");
+    }
+    pw.println(s);
+  }
+
   /**
    * Returns the number of arguments for the given command option
    * (include the option itself)
@@ -95,8 +110,8 @@ public class UnitTestDoclet {
     try {
       PrintWriter pw =
         new PrintWriter(new FileWriter(outputFile));
-      Formatter.center("GemFire Unit Test Summary", pw);
-      Formatter.center(new Date().toString(), pw);
+      center("GemFire Unit Test Summary", pw);
+      center(new Date().toString(), pw);
       pw.println("");
 
       ClassDoc[] classes = root.classes();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
index 37f9744..9f36959 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
@@ -20,8 +20,6 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 
-import util.TestException;
-
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.AttributesMutator;
 import com.gemstone.gemfire.cache.Cache;
@@ -76,6 +74,7 @@ import dunit.DistributedTestCase;
 import dunit.Host;
 import dunit.SerializableCallable;
 import dunit.SerializableRunnable;
+import dunit.TestException;
 import dunit.VM;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/data/NewPortfolio.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/data/NewPortfolio.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/data/NewPortfolio.java
new file mode 100644
index 0000000..61287f7
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/data/NewPortfolio.java
@@ -0,0 +1,246 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.gemstone.gemfire.cache.query.data;
+
+import java.io.Serializable;
+import java.util.*;
+
+/**
+ * A version of the Portfolio Object used for query. 
+ */
+public class NewPortfolio implements Serializable {
+  
+  protected String myVersion;
+
+  protected static final Random rng = new Random();
+
+  protected int NUM_OF_TYPES = 10;
+  protected int MAX_NUM_OF_POSITIONS = 5;     
+  protected int NUM_OF_SECURITIES = 200;
+  private int MAX_QTY = 100;    //max is 100*100 
+  private int MAX_PRICE = 100;
+  protected int id = 0;           
+  protected String name = "name";         //key value, needs to be unique
+  protected String status = "status";
+  protected String type = "type";
+  protected Map positions = new HashMap();
+  public String undefinedTestField = null;
+  
+  public NewPortfolio() {
+    //use default
+    myVersion = "tests/parReg.query.NewPortfolio";
+  }
+  
+  /**
+   * Constructor to randomly populate the portfolio.
+   * @param name
+   * @param id
+   */
+  public NewPortfolio(String name, int id) {
+    myVersion = "tests/parReg.query.NewPortfolio";
+    this.name = name;
+    this.id = id;
+    
+    this.status = id % 2 == 0 ? "active" : "inactive";
+    this.type = "type" + (id % NUM_OF_TYPES);
+    
+    setPositions();
+  }
+  
+  public int getId() {
+    return id;
+  }
+  
+  public String getName() {
+    return name;
+  }
+  
+  public String getStatus() {
+    return status;
+  }
+  
+  public String getType() {
+    return type;
+  }
+  
+  public void setId(int id) {
+    this.id = id;
+  }
+  
+  public void setName(String name) {
+    this.name = name;
+  }
+  
+  public void  setStatus(String status) {
+    this.status = status;
+  }
+  
+  public void setType(String type) {
+    this.type = type;
+  }
+    
+  public void init( int i ) {
+    this.name = new Integer(i).toString();
+    this.id = i;
+    this.status = i % 2 == 0 ? "active" : "inactive";
+    this.type = "type" + (i % NUM_OF_TYPES);
+    
+    setPositions();
+
+  }
+  
+  private void setPositions() {
+    int numOfPositions = rng.nextInt(MAX_NUM_OF_POSITIONS);
+    if (numOfPositions == 0) 
+      numOfPositions++;
+     
+    int secId =  rng.nextInt(NUM_OF_SECURITIES);
+    
+    for (int i=0; i < numOfPositions; i++) {
+      Properties props = getProps();
+      
+//    secId needs to be UNIQUE in one portfolio, keep track MAX_NUM_OF_POSITIONS and NUM_OF_SECURITIES
+      secId += i * 7;                    
+      if (secId > NUM_OF_SECURITIES)
+        secId -= NUM_OF_SECURITIES;
+      props.setProperty("secId", new Integer(secId).toString());
+      
+      NewPosition pos = new NewPosition();
+      pos.init(props);
+      this.positions.put(pos.getSecId(), pos);
+    }
+  }
+  
+  public void validate( int index ) {
+    //do nothing
+  }
+  
+  public int getIndex() {
+    return this.id;
+  }
+  
+  public Map getPositions(){
+    return positions;
+  }
+  
+  /**
+   * To provide random values to populate a position.
+   * @return
+   */
+  protected Properties getProps() {
+   Properties props = new Properties();
+   Double qty = new Double(rng.nextInt(MAX_QTY) * 100.00);
+   Double mktValue = new Double(rng.nextDouble() * MAX_PRICE); 
+
+   props.setProperty("qty", qty.toString());
+   props.setProperty("mktValue", mktValue.toString());
+
+   return props;
+  }
+  
+  /**
+   * To enable the comparison.
+   */
+  public boolean equals(Object anObj) {
+    
+    if (anObj == null) {
+       return false;
+    }
+
+    if (anObj.getClass().getName().equals(this.getClass().getName())) { // cannot do class identity check for pdx tets
+       NewPortfolio np = (NewPortfolio)anObj;
+       if (!np.name.equals(this.name) || (np.id != this.id) || !np.type.equals(this.type) || !np.status.equals(this.status)) {
+         return false;
+       }
+       
+       if (np.positions == null) {
+          if (this.positions != null) {
+            return false;
+          }
+       } else {
+         if (np.positions.size() != this.positions.size()) {
+           return false;
+         }
+         else {                 //loops thru the map of positions
+           Iterator itr = np.positions.values().iterator();
+           NewPosition pos;
+           while (itr.hasNext()) {
+             pos = (NewPosition)itr.next();
+             if (!this.positions.containsValue(pos)){
+               return false;
+             }            
+           }
+         }
+       }
+    } else {
+      //not same class
+       return false;
+    }
+    return true;
+ }
+
+  public int hashCode() {
+    int result = 17;
+    result = 37 * result + name.hashCode();
+    result = 37 * result + status.hashCode();
+    result = 37 * result + type.hashCode();
+    result = 37 * result + id;
+    result = 37 * result + positions.hashCode();
+    
+    return result;
+  }
+ 
+  /** Create a map of fields and field values to use to write to the blackboard
+   *  since PdxSerialiables cannot be put on the blackboard since the MasterController
+   *  does not have pdx objects on its classpath. For PdxSerializables
+   *  we put this Map on the blackboard instead.
+   */
+  public Map createPdxHelperMap() {
+    Map fieldMap = new HashMap();
+    fieldMap.put("className", this.getClass().getName());
+    fieldMap.put("myVersion", myVersion);
+    fieldMap.put("id", id);
+    fieldMap.put("name", name);
+    fieldMap.put("status", status);
+    fieldMap.put("type", type);
+    fieldMap.put("positions", positions);
+    fieldMap.put("undefinedTestField", undefinedTestField);
+    return fieldMap;
+  }
+
+  /** Restore the fields of this instance using the values of the Map, created
+   *  by createPdxHelperMap()
+   */
+  public void restoreFromPdxHelperMap(Map aMap) {
+    this.myVersion = (String)aMap.get("myVersion");
+    this.id = (Integer)aMap.get("id");
+    this.name = (String)aMap.get("name");
+    this.status = (String)aMap.get("status");
+    this.type = (String)aMap.get("type");
+    this.positions = (Map)aMap.get("positions");
+    this.undefinedTestField = (String)aMap.get("undefinedTestField");
+  }
+
+  @Override
+  public String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.append("NewPortfolio [ID=" + this.id + " status=" + status);
+    sb.append(" name=" + this.name);
+    
+    Iterator iter = positions.entrySet().iterator();
+    sb.append(" NewPositions:[ ");
+    while (iter.hasNext()) {
+      Map.Entry entry = (Map.Entry) iter.next();
+      sb.append(entry.getKey() + ":" + entry.getValue() + ", ");
+    }
+    sb.append("] ]");
+    return sb.toString();
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/data/NewPosition.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/data/NewPosition.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/data/NewPosition.java
new file mode 100644
index 0000000..5b67d94
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/data/NewPosition.java
@@ -0,0 +1,153 @@
+/*=========================================================================
+ * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+package com.gemstone.gemfire.cache.query.data;
+
+import java.util.*;
+import java.io.Serializable;
+import com.gemstone.gemfire.cache.Declarable;
+
+/**
+ * Represents a number of shares of a stock ("security") held in a
+ * {@link NewPortfolio}.
+ *
+ * <P>
+ *
+ * This class is <code>Serializable</code> because we want it to be
+ * distributed to multiple members of a distributed system.  Because
+ * this class is <code>Declarable</code>, we can describe instances of
+ * it in a GemFire <code>cache.xml</code> file.
+ *
+ * @author GemStone Systems, Inc.
+ * @since 4.0
+ */
+public class NewPosition implements Declarable, Serializable, Comparable {
+
+  private static final Random rng = new Random();
+
+  protected String secId;
+  protected double qty;
+  protected double mktValue;
+  private final int NUM_OF_SECURITIES = 200;
+  private final int MAX_PRICE = 100;
+  
+  public void init(Properties props) {
+    this.secId = props.getProperty("secId");
+    this.qty = Double.parseDouble(props.getProperty("qty"));
+    this.mktValue = Double.parseDouble(props.getProperty("mktValue"));
+  }
+  
+  /**
+   * Returns the id of the security held in this position.
+   */
+  public String getSecId(){
+    return this.secId;
+  }
+  
+  /**
+   * Returns the number of shares held in this position.
+   */
+  public double getQty(){
+    return this.qty;
+  }
+    
+  /**
+   * Returns the value of this position.
+   */
+  public double getMktValue() {
+    return this.mktValue;
+  }
+
+  public String toString(){
+    return "NewPosition [secId="+secId+" qty="+this.qty+" mktValue="+mktValue+"]";
+  }
+  
+  public static String toString(List aList) {
+    StringBuffer aStr = new StringBuffer();
+    aStr.append("List of size " + aList.size() + "\n");
+    for (int i = 0; i < aList.size(); i++) {
+       Object anObj = aList.get(i);
+       if (anObj instanceof NewPosition) {
+          NewPosition p = (NewPosition)(anObj);
+          aStr.append(p.toString());
+       }
+       aStr.append("\n");
+    }
+    return aStr.toString();
+ }
+
+  /**
+   * To enable the comparison.
+   */
+  public boolean equals(Object anObj) {
+    if (anObj == null) {
+       return false;
+    }
+    if (anObj.getClass() == this.getClass()) {
+       NewPosition pos = (NewPosition)anObj;
+       if ((pos.mktValue != this.mktValue) || (pos.qty != this.qty))  {
+          return false;
+       }
+
+       if (pos.secId == null) {
+          if (this.secId != null) {
+
+             return false;
+          }
+       } else {
+         if (!(pos.secId.equals(this.secId))) {
+
+            return false;
+         }
+       }
+    } else {
+
+       return false;
+    }
+    return true;
+ }
+  
+  public int hashCode() {
+    int result = 17;
+    result = 37 * result + (int) (Double.doubleToLongBits(mktValue)^(Double.doubleToLongBits(mktValue)>>>32));
+    result = 37 * result + (int) (Double.doubleToLongBits(qty)^(Double.doubleToLongBits(qty)>>>32));
+    result = 37 * result + secId.hashCode();
+     
+    return result;
+  }
+  
+  /**
+   * to configure position using index, set quantity equal to the index
+   */
+  public void init(int i) {
+    this.secId = new Integer(rng.nextInt(NUM_OF_SECURITIES)).toString();
+    this.qty = new Double(i).doubleValue();
+    this.mktValue = new Double(rng.nextDouble() * MAX_PRICE ).doubleValue();
+  }
+  
+  public int getIndex() {
+    return (int)this.qty;
+  }
+  
+  public void validate (int index){
+  }
+
+  @Override
+  public int compareTo(Object o) {
+    if( o == this) {
+      return 0;
+    }else {
+      if (o instanceof NewPosition) {
+        return Integer.valueOf(this.hashCode()).compareTo(Integer.valueOf(((NewPosition)o).hashCode()));
+      } else {
+        return -1;
+      }
+    }
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java
index cdd03b3..3dd0424 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java
@@ -13,8 +13,6 @@ import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
-import util.TestException;
-
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.DataPolicy;
@@ -61,6 +59,7 @@ import dunit.AsyncInvocation;
 import dunit.DistributedTestCase;
 import dunit.Host;
 import dunit.SerializableCallable;
+import dunit.TestException;
 import dunit.VM;
 
 public class ResourceManagerWithQueryMonitorDUnitTest extends BridgeTestCase {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MiscJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MiscJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MiscJUnitTest.java
index 7a86e9c..cdf39c0 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MiscJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MiscJUnitTest.java
@@ -27,6 +27,7 @@ import com.gemstone.gemfire.cache.query.FunctionDomainException;
 import com.gemstone.gemfire.cache.query.Index;
 import com.gemstone.gemfire.cache.query.IndexType;
 import com.gemstone.gemfire.cache.query.NameResolutionException;
+import com.gemstone.gemfire.cache.query.data.NewPortfolio;
 import com.gemstone.gemfire.cache.query.Query;
 import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
 import com.gemstone.gemfire.cache.query.QueryService;
@@ -49,7 +50,6 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import parReg.query.unittest.NewPortfolio;
 import static org.junit.Assert.*;
 import junit.framework.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
index 5be500b..4df4e4f 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
@@ -25,7 +25,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import util.TestException;
+import dunit.TestException;
 
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.query.Index;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java
index 7aef6de..a57e23a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRColocatedEquiJoinDUnitTest.java
@@ -12,9 +12,6 @@ package com.gemstone.gemfire.cache.query.partitioned;
 
 import java.util.ArrayList;
 
-import parReg.query.unittest.NewPortfolio;
-import util.TestException;
-
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheClosedException;
@@ -36,6 +33,7 @@ import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
 import com.gemstone.gemfire.cache.query.QueryService;
 import com.gemstone.gemfire.cache.query.RegionNotFoundException;
 import com.gemstone.gemfire.cache.query.SelectResults;
+import com.gemstone.gemfire.cache.query.data.NewPortfolio;
 import com.gemstone.gemfire.cache.query.data.Portfolio;
 import com.gemstone.gemfire.cache.query.partitioned.PRQueryDUnitHelper.TestQueryFunction;
 import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
@@ -46,6 +44,7 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegionDUnitTestCase;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 
 import dunit.Host;
+import dunit.TestException;
 import dunit.VM;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
index 3135a26..3b89151 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
@@ -23,9 +23,6 @@ import java.util.Random;
 import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 
-import parReg.query.unittest.NewPortfolio;
-import util.TestException;
-
 import com.gemstone.gemfire.CancelException;
 import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.cache.AttributesFactory;
@@ -60,6 +57,7 @@ import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
 import com.gemstone.gemfire.cache.query.QueryService;
 import com.gemstone.gemfire.cache.query.RegionNotFoundException;
 import com.gemstone.gemfire.cache.query.SelectResults;
+import com.gemstone.gemfire.cache.query.data.NewPortfolio;
 import com.gemstone.gemfire.cache.query.data.Portfolio;
 import com.gemstone.gemfire.cache.query.data.PortfolioData;
 import com.gemstone.gemfire.cache.query.data.Position;
@@ -81,6 +79,8 @@ import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
 import com.gemstone.gemfire.util.test.TestUtil;
 
 import dunit.SerializableRunnable;
+import dunit.TestException;
+
 
 /**
  * This is a helper class for the various Partitioned Query DUnit Test Cases

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheSerializableRunnable.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheSerializableRunnable.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheSerializableRunnable.java
index e25c87e..3adfbfd 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheSerializableRunnable.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheSerializableRunnable.java
@@ -9,7 +9,6 @@ package com.gemstone.gemfire.cache30;
 
 import com.gemstone.gemfire.cache.*;
 
-import util.TestException;
 import dunit.*;
 import junit.framework.AssertionFailedError;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SearchAndLoadDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SearchAndLoadDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SearchAndLoadDUnitTest.java
index fad5f79..a4a1ab8 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SearchAndLoadDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/SearchAndLoadDUnitTest.java
@@ -11,7 +11,6 @@ package com.gemstone.gemfire.cache30;
 import com.gemstone.gemfire.cache.*;
 
 import dunit.*;
-//import hydra.ClientMgr;
 
 /**
  * This class tests various search load and write scenarios for distributed regions

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/LDM.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/LDM.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/LDM.java
index 6c88136..e6e5b9a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/LDM.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/LDM.java
@@ -11,7 +11,7 @@ import java.util.Properties;
 
 import org.apache.logging.log4j.Logger;
 
-import util.TestException;
+import dunit.TestException;
 
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.internal.logging.LogService;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java
index df780b9..857265b 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestUtilsDUnitTest.java
@@ -9,8 +9,6 @@
 
 package com.gemstone.gemfire.internal.cache;
 
-import hydra.GsRandom;
-
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -18,6 +16,7 @@ import java.io.Serializable;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Random;
 import java.util.Set;
 
 import com.gemstone.gemfire.DataSerializable;
@@ -80,7 +79,7 @@ public class PartitionedRegionTestUtilsDUnitTest extends
     vm0.invoke(new CacheSerializableRunnable("GetSomeKeys") {
       public void run2() throws CacheException {
         PartitionedRegion pr = (PartitionedRegion) getCache().getRegion(r);
-        GsRandom rand = new GsRandom(123);
+        Random rand = new Random(123);
         // Assert that its empty
         for(int i=0; i<5; i++) {
           getLogWriter().info("Invocation " + i + " of getSomeKeys");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SystemFailureDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SystemFailureDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SystemFailureDUnitTest.java
index 7c9d6f0..c638b3c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SystemFailureDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/SystemFailureDUnitTest.java
@@ -18,13 +18,12 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 
 import dunit.Host;
 import dunit.RMIException;
+import dunit.TestException;
 import dunit.VM;
 
 import java.io.Serializable;
 import java.util.ArrayList;
 
-import util.TestException;
-
 import junit.framework.Assert;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorJUnitTest.java
index 772a994..cdfc705 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorJUnitTest.java
@@ -24,7 +24,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import util.TestException;
+import dunit.TestException;
 
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.CacheFactory;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MyTransactionFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MyTransactionFunction.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MyTransactionFunction.java
index 61449d2..5241f75 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MyTransactionFunction.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MyTransactionFunction.java
@@ -10,7 +10,7 @@ package com.gemstone.gemfire.internal.cache.execute;
 import java.util.ArrayList;
 import java.util.Iterator;
 
-import util.TestException;
+import dunit.TestException;
 
 import com.gemstone.gemfire.cache.CacheTransactionManager;
 import com.gemstone.gemfire.cache.CommitConflictException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java
index 5e68ae0..babe1df 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRTransactionDUnitTest.java
@@ -12,8 +12,6 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
 
-import util.TestException;
-
 import com.gemstone.gemfire.cache.CacheTransactionManager;
 import com.gemstone.gemfire.cache.EntryEvent;
 import com.gemstone.gemfire.cache.Region;
@@ -36,6 +34,7 @@ import com.gemstone.gemfire.internal.cache.execute.data.Shipment;
 import com.gemstone.gemfire.internal.cache.execute.data.ShipmentId;
 
 import dunit.SerializableCallable;
+import dunit.TestException;
 
 /**
  * Test for co-located PR transactions.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java
index ae2519c..9e8de9d 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java
@@ -46,10 +46,9 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.HAEventWrapper;
 
 import dunit.DistributedTestCase;
 import dunit.Host;
+import dunit.TestException;
 import dunit.VM;
 
-import util.TestException;
-
 /**
  * This DUnit contains various tests to ensure new implementation of ha region
  * queues works as expected.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java
index 0d095ab..c8d0576 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueDUnitTest.java
@@ -13,8 +13,6 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
-import util.TestException;
-
 import junit.framework.Assert;
 
 import com.gemstone.gemfire.LogWriter;
@@ -37,6 +35,7 @@ import com.gemstone.gemfire.internal.cache.HARegion;
 
 import dunit.DistributedTestCase;
 import dunit.Host;
+import dunit.TestException;
 import dunit.VM;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRVVRecoveryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRVVRecoveryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRVVRecoveryDUnitTest.java
index 62e16c5..92492b6 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRVVRecoveryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRVVRecoveryDUnitTest.java
@@ -16,8 +16,6 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import util.TestException;
-
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
@@ -61,6 +59,7 @@ import dunit.AsyncInvocation;
 import dunit.Host;
 import dunit.SerializableCallable;
 import dunit.SerializableRunnable;
+import dunit.TestException;
 import dunit.VM;
 
 public class PersistentRVVRecoveryDUnitTest extends PersistentReplicatedTestBase {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
index b0b9912..b05b0b5 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
@@ -12,8 +12,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Properties;
 
-import util.TestException;
-
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheException;
@@ -39,6 +37,7 @@ import com.gemstone.gemfire.cache.client.internal.Connection;
 
 import dunit.DistributedTestCase;
 import dunit.Host;
+import dunit.TestException;
 import dunit.VM;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/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 31497eb..e32addd 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
@@ -29,7 +29,6 @@ import java.util.ArrayList;
 import java.util.List;
 
 import junit.framework.Assert;
-import util.TestException;
 
 public class VersionClassLoader {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/dunit/MethExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/dunit/MethExecutor.java b/gemfire-core/src/test/java/dunit/MethExecutor.java
new file mode 100644
index 0000000..31dd303
--- /dev/null
+++ b/gemfire-core/src/test/java/dunit/MethExecutor.java
@@ -0,0 +1,384 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+
+package dunit;
+
+//import java.io.*;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+
+import com.gemstone.gemfire.SystemFailure;
+
+/**
+* 
+* A class specialized for executing (via reflection) the receiver/selector
+* pairs found in TestTasks. 
+*
+*/
+public class MethExecutor {
+
+   // @todo lises add static args method
+
+  /**
+   * Helper method that searches a class (and its superclasses) for a
+   * method with the given name and parameter types.
+   *
+   * @throws NoSuchMethodException
+   *         If the method cannot be found
+   */
+  public static Method getMethod(Class c, String methodName, Class[] paramTypes)
+  throws NoSuchMethodException {
+
+    ArrayList matchingMethods  = new ArrayList();
+    for (Class q = c; q != null; q = q.getSuperclass()) {
+      Method[] methods = q.getDeclaredMethods();
+    NEXT_METHOD:
+      for (int i = 0; i < methods.length; i++) {
+        Method m = methods[i];
+        if (!m.getName().equals(methodName)) {
+          continue;
+        }
+
+        Class[] argTypes = m.getParameterTypes();
+        if (argTypes.length != paramTypes.length) {
+          continue;
+        }
+
+        for (int j = 0; j < argTypes.length; j++) {
+          if(paramTypes[j] == null) {
+            if(argTypes[j].isPrimitive()) {
+              //this parameter is not ok, the parameter is a primative and the value is null
+              continue NEXT_METHOD;
+            } else {
+              //this parameter is ok, the argument is an object and the value is null
+              continue;
+            }
+          }
+          if (!argTypes[j].isAssignableFrom(paramTypes[j])) {
+            Class argType = argTypes[j];
+            Class paramType = paramTypes[j];
+
+            if (argType.isPrimitive()) {
+              if ((argType.equals(boolean.class) &&
+                   paramType.equals(Boolean.class)) ||
+                  (argType.equals(short.class) &&
+                   paramType.equals(Short.class)) ||
+                  (argType.equals(int.class) &&
+                   paramType.equals(Integer.class)) ||
+                  (argType.equals(long.class) &&
+                   paramType.equals(Long.class)) ||
+                  (argType.equals(float.class) &&
+                   paramType.equals(Float.class)) ||
+                  (argType.equals(double.class) &&
+                   paramType.equals(Double.class)) ||
+                  (argType.equals(char.class) &&
+                   paramType.equals(Character.class)) ||
+                  (argType.equals(byte.class) &&
+                   paramType.equals(Byte.class)) ||
+                  false) {
+
+                // This parameter is okay, try the next arg
+                continue;
+              }
+            }
+            continue NEXT_METHOD;
+          }
+        }
+
+        matchingMethods.add(m);
+      }
+      
+      //We want to check to make sure there aren't two
+      //ambiguous methods on the same class. But a subclass
+      //can still override a method on a super class, so we'll stop
+      //if we found a method on the subclass.
+      if(matchingMethods.size() > 0) {
+        break;
+      }
+    }
+    
+    if(matchingMethods.isEmpty()) {
+      StringBuffer sb = new StringBuffer();
+      sb.append("Could not find method ");
+      sb.append(methodName);
+      sb.append(" with ");
+      sb.append(paramTypes.length);
+      sb.append(" parameters [");
+      for (int i = 0; i < paramTypes.length; i++) {
+        String name = paramTypes[i] == null ? null : paramTypes[i].getName();
+        sb.append(name);
+        if (i < paramTypes.length - 1) {
+          sb.append(", ");
+        }
+      }
+      sb.append("] in class ");
+      sb.append(c.getName());
+      throw new NoSuchMethodException(sb.toString());
+    }
+    if(matchingMethods.size() > 1) {
+      StringBuffer sb = new StringBuffer();
+      sb.append("Method is ambiguous ");
+      sb.append(methodName);
+      sb.append(" with ");
+      sb.append(paramTypes.length);
+      sb.append(" parameters [");
+      for (int i = 0; i < paramTypes.length; i++) {
+        String name = paramTypes[i] == null ? null : paramTypes[i].getName();
+        sb.append(name);
+        if (i < paramTypes.length - 1) {
+          sb.append(", ");
+        }
+      }
+      sb.append("] in class ");
+      sb.append(c.getName());
+      throw new NoSuchMethodException(sb.toString());
+    }
+    else return (Method) matchingMethods.get(0);
+  }
+
+  /**
+  *
+  * Send the message "selector" to the class named "receiver".
+  * Return the result, including stack trace (if any).
+  *
+  */
+  public static MethExecutorResult execute(String receiver, String selector) {
+    return execute(receiver, selector, null);
+  }
+
+  /**
+   * Executes the given static method on the given class with the
+   * given arguments.
+   */
+  public static MethExecutorResult execute(String receiver, 
+                                           String selector, 
+                                           Object[] args) {
+    try {
+      // get the class
+      Class receiverClass = Class.forName(receiver);
+
+      // invoke the method
+      Object res = null;
+      try {
+        Class[] paramTypes;
+        if (args == null) {
+          paramTypes = new Class[0];
+
+        } else {
+          paramTypes = new Class[args.length];
+          for (int i = 0; i < args.length; i++) {
+            if (args[i] == null) {
+              paramTypes[i] = null;
+
+            } else {
+              paramTypes[i] = args[i].getClass();
+            }
+          }
+        }
+
+        Method theMethod =
+          getMethod(receiverClass, selector, paramTypes);
+        theMethod.setAccessible(true);
+        res = theMethod.invoke(receiverClass, args);
+        return new MethExecutorResult( res );
+
+      } catch (InvocationTargetException invTargEx) {
+        Throwable targEx = invTargEx.getTargetException();
+        if ( targEx == null ) {
+          return new MethExecutorResult( res );
+
+        } else {
+          return new MethExecutorResult(targEx);
+        }
+      }
+
+    } 
+    catch (VirtualMachineError e) {
+      SystemFailure.initiateFailure(e);
+      throw e;
+    }
+    catch (Throwable t) {
+//       String s = "While trying to invoke " + receiver + "." +
+//         selector;
+//       t = new HydraConfigException(s, t);
+      return new MethExecutorResult(t);
+    } 
+  }
+
+  /**
+  *
+  * Send the message "selector" to the object "target".
+  * Return the result, including stack trace (if any).
+  *
+  */
+  public static MethExecutorResult executeObject(Object target, String selector) {
+    return executeObject(target, selector, null);
+  }
+
+  /**
+   * Executes the given instance method on the given object with the
+   * given arguments.
+   */
+  public static MethExecutorResult executeObject(Object target, 
+                                           String selector, 
+                                           Object[] args) {
+    try {
+      // get the class
+      Class receiverClass = Class.forName(target.getClass().getName());
+
+      // invoke the method
+      Object res = null;
+      try {
+        Class[] paramTypes;
+        if (args == null) {
+          paramTypes = new Class[0];
+
+        } else {
+          paramTypes = new Class[args.length];
+          for (int i = 0; i < args.length; i++) {
+            if (args[i] == null) {
+              paramTypes[i] = Object.class;
+
+            } else {
+              paramTypes[i] = args[i].getClass();
+            }
+          }
+        }
+
+        Method theMethod =
+          getMethod(receiverClass, selector, paramTypes);
+        theMethod.setAccessible(true);
+        res = theMethod.invoke(target, args);
+        return new MethExecutorResult( res );
+
+      } catch (InvocationTargetException invTargEx) {
+        Throwable targEx = invTargEx.getTargetException();
+        if ( targEx == null ) {
+          return new MethExecutorResult( res );
+
+        } else {
+          return new MethExecutorResult(targEx);
+        }
+      }
+
+    } 
+    catch (VirtualMachineError e) {
+      SystemFailure.initiateFailure(e);
+      throw e;
+    }
+    catch (Throwable t) {
+      return new MethExecutorResult(t);
+    } 
+  }
+
+  /**
+  *
+  * Send the message "selector" to an instance of the class named "receiver".
+  * Return the result, including stack trace (if any).
+  *
+  */
+  public static MethExecutorResult executeInstance( String receiver, String selector ) {
+
+    try {
+      // get the class
+      Class receiverClass = Class.forName(receiver);
+      Object target = receiverClass.newInstance();
+
+      // invoke the method
+      Object res = null;
+      try {
+        Method theMethod =
+          getMethod(receiverClass, selector, new Class[0]);
+        res = theMethod.invoke(target, new Object[0] );
+        return new MethExecutorResult( res );
+
+      } catch (InvocationTargetException invTargEx) {
+        Throwable targEx = invTargEx.getTargetException();
+        if ( targEx == null ) {
+          return new MethExecutorResult( res );
+        } else {
+          return new MethExecutorResult(targEx);
+        }
+      }
+
+    } 
+    catch (VirtualMachineError e) {
+      SystemFailure.initiateFailure(e);
+      throw e;
+    }
+    catch (Throwable t) {
+      return new MethExecutorResult(t);
+    } 
+  }
+
+  /**
+  *
+  * Send the message "selector" to an instance of the class named "receiver".
+  * Return the result, including stack trace (if any).
+  *
+  */
+  public static MethExecutorResult executeInstance( String receiver, String selector,
+                                                    Class[] types, Object[] args ) {
+
+    try {
+      // get the class
+      Class receiverClass = Class.forName(receiver);
+      Constructor init =
+        receiverClass.getDeclaredConstructor(new Class[0]);
+      init.setAccessible(true);
+      Object target = init.newInstance(new Object[0]);
+
+      // invoke the method
+      Object res = null;
+      try {
+        Method theMethod = getMethod(receiverClass, selector, types);
+        res = theMethod.invoke(target, args );
+        return new MethExecutorResult( res );
+
+      } catch (InvocationTargetException invTargEx) {
+        Throwable targEx = invTargEx.getTargetException();
+        if ( targEx == null ) {
+          return new MethExecutorResult( res );
+
+        } else {
+          return new MethExecutorResult(targEx);
+        }
+      }
+
+    } 
+    catch (VirtualMachineError e) {
+      SystemFailure.initiateFailure(e);
+      throw e;
+    }
+    catch (Throwable t) {
+      return new MethExecutorResult(t);
+    } 
+  }
+
+  /** 
+  *
+  * A small program for testing this class.
+  *
+  */
+  public static String testMethod1() {
+    return "The result is: " + System.currentTimeMillis(); 
+  }
+  public static String testMethod2() {
+    throw new ArrayIndexOutOfBoundsException("frip");
+  }
+  public static void main(String[] args) {
+    MethExecutorResult result = null;
+    result = MethExecutor.execute( "dunit.MethExecutor", "testMethod1" );
+    System.out.println(result.toString());
+    result = MethExecutor.execute( "dunit.MethExecutor", "testMethod2" );
+    System.out.println(result.toString());
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/dunit/MethExecutorResult.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/dunit/MethExecutorResult.java b/gemfire-core/src/test/java/dunit/MethExecutorResult.java
new file mode 100644
index 0000000..6355652
--- /dev/null
+++ b/gemfire-core/src/test/java/dunit/MethExecutorResult.java
@@ -0,0 +1,184 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *========================================================================
+ */
+
+package dunit;
+
+import java.io.*;
+
+/**
+*
+* The result of a MethExecutor execute method.
+*
+*/
+public class MethExecutorResult implements Serializable {
+
+  /** A "result" object that indicates that an exception occurred
+   * while invoking the method */
+  public static final Serializable EXCEPTION_OCCURRED = new
+    Serializable() {
+      public boolean equals(Object o) {
+        // Allows instances to be compared across VMs
+        return o != null && this.getClass().equals(o.getClass());
+      }
+
+      public String toString() {
+        return "EXCEPTION_OCCURRED";
+      }
+    };
+
+  /** A "exception" object that indicates that an exception could not
+   * be serialized. */
+  public static final Throwable NONSERIALIZABLE_EXCEPTION = new
+    Throwable() {
+      public boolean equals(Object o) {
+        // Allows instances to be compared across VMs
+        return o != null && this.getClass().equals(o.getClass());
+      }
+
+      public String toString() {
+        return "NONSERIALIZABLE_EXCEPTION";
+      }
+    };
+
+
+  ////////////////////  Instance Methods  ///////////////////////////
+
+  /** The result of execution (may be an exception or error type) */
+  private Object result;
+
+  /** The exception that resulted from invoking the method */
+  private Throwable exception;
+
+  /** Type of the exception (if applicable) */
+  private String exceptionClassName;
+
+  /** Message of the exception (if applicable) */
+  private String exceptionMessage;
+
+  /** Stack trace information (if applicable) */
+  private String stackTrace;
+
+  public MethExecutorResult() {
+    this.result = null;
+  }
+
+  public MethExecutorResult( Object result ) {
+    this.result = result;
+  }
+
+  /**
+   * This constructor is invoked from the closed-source hydra-based
+   * dunit when converting a hydra.MethExecutorResult to a
+   * dunit.MethExecutorResult.
+   */
+  public MethExecutorResult(Object aResult, Throwable anException, String anExceptionClassName, String anExceptionMessage, String aStackTrace) {
+    this.result = aResult;
+    this.exception = anException;
+    this.exceptionClassName = anExceptionClassName;
+    this.exceptionMessage = anExceptionMessage;
+    this.stackTrace = aStackTrace;
+  }
+
+  /**
+   * This constructor is invoked when invoking a method resulted in an
+   * exception being thrown.  The "result" is set to {@link
+   * #EXCEPTION_OCCURRED}.  If the exception could not be serialized,
+   * {@link #getException()} will return IOException with the exception
+   * stack as the message.
+   */
+  public MethExecutorResult(Throwable thr) {
+    this.result = EXCEPTION_OCCURRED;
+    this.exceptionClassName = thr.getClass().getName();
+    this.exceptionMessage = thr.getMessage();
+
+    StringWriter sw = new StringWriter();
+
+    thr.printStackTrace(new PrintWriter(sw, true));
+    this.stackTrace = sw.toString();
+
+    try {
+      ByteArrayOutputStream baos = new ByteArrayOutputStream();
+      ObjectOutputStream oos = new ObjectOutputStream(baos);
+      oos.writeObject(thr);
+      this.exception = thr;
+
+    } catch (IOException ex) {
+      sw = new StringWriter();
+      ex.printStackTrace(new PrintWriter(sw, true));
+      this.exception = new IOException(sw.toString());
+    }
+  }
+
+  public String toString() {
+    StringBuffer s = new StringBuffer();
+    s.append( this.getResult() );
+    s.append( "\n" );
+    if ( this.getStackTrace() != null ) {
+      s.append( this.getStackTrace() );
+    }
+    return s.toString();
+  }
+
+  /**
+   * Returns the result of the method call.  If an exception was
+   * thrown during the method call, {@link #EXCEPTION_OCCURRED} is
+   * returned.
+   *
+   * @see #exceptionOccurred()
+   */
+  public Object getResult() {
+    return this.result;
+  }
+
+  /**
+   * Returns the name of the exception class of the exception that
+   * was thrown while invoking a method.  If no exception was thrown,
+   * <code>null</code> is returned.
+   */
+  public String getExceptionClassName() {
+    return this.exceptionClassName;
+  }
+
+  /**
+   * Returns the message of the exception that was thrown while
+   * invoking a method.  If no exception was thrown, <code>null</code>
+   * is returned.
+   */
+  public String getExceptionMessage() {
+    return this.exceptionMessage;
+  }
+
+  /**
+   * Returns the stack trace of the exception that was thrown while
+   * invoking a method.  If no exception was thrown, <code>null</code>
+   * is returned.
+   */
+  public String getStackTrace() {
+    return this.stackTrace;
+  }
+
+  /**
+   * Returns the exception that was thrown while invoking a method.
+   * If the exception could not be serialized, then {@link
+   * #NONSERIALIZABLE_EXCEPTION} is returned.  If no exception was
+   * thrown, <code>null</code> is returned.
+   */
+  public Throwable getException() {
+    return this.exception;
+  }
+
+  /**
+   * Returns whether or not an exception occurred while invoking the
+   * method 
+   */
+  public boolean exceptionOccurred() {
+    return EXCEPTION_OCCURRED.equals(this.result);
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/dunit/RemoteDUnitVMIF.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/dunit/RemoteDUnitVMIF.java b/gemfire-core/src/test/java/dunit/RemoteDUnitVMIF.java
index de84292..2489ebd 100644
--- a/gemfire-core/src/test/java/dunit/RemoteDUnitVMIF.java
+++ b/gemfire-core/src/test/java/dunit/RemoteDUnitVMIF.java
@@ -1,6 +1,6 @@
 package dunit;
 
-import hydra.MethExecutorResult;
+import dunit.MethExecutorResult;
 
 import java.rmi.Remote;
 import java.rmi.RemoteException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/dunit/TestException.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/dunit/TestException.java b/gemfire-core/src/test/java/dunit/TestException.java
new file mode 100644
index 0000000..e071442
--- /dev/null
+++ b/gemfire-core/src/test/java/dunit/TestException.java
@@ -0,0 +1,27 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package dunit;
+
+import java.lang.Error;
+
+public class TestException extends Error {
+
+  public TestException(String message, Throwable cause) {
+    super(message, cause);
+  }
+
+public TestException(String name) {
+   super(name);
+}
+
+public TestException(StringBuffer name) {
+   super(name.toString());
+}
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/dunit/VM.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/dunit/VM.java b/gemfire-core/src/test/java/dunit/VM.java
index 323dbfb..59772ce 100644
--- a/gemfire-core/src/test/java/dunit/VM.java
+++ b/gemfire-core/src/test/java/dunit/VM.java
@@ -7,8 +7,6 @@
  */
 package dunit;
 
-import hydra.MethExecutorResult;
-
 import java.io.File;
 import java.io.PrintWriter;
 import java.io.StringWriter;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/dunit/standalone/ChildVM.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/dunit/standalone/ChildVM.java b/gemfire-core/src/test/java/dunit/standalone/ChildVM.java
index 24c741e..adf078d 100644
--- a/gemfire-core/src/test/java/dunit/standalone/ChildVM.java
+++ b/gemfire-core/src/test/java/dunit/standalone/ChildVM.java
@@ -7,9 +7,6 @@
  */
 package dunit.standalone;
 
-import hydra.HydraRuntimeException;
-import hydra.Log;
-
 import java.rmi.Naming;
 
 import org.apache.logging.log4j.Logger;
@@ -25,10 +22,6 @@ import dunit.standalone.DUnitLauncher.MasterRemote;
  */
 public class ChildVM {
   
-  static {
-    createHydraLogWriter();
-  }
-  
   private final static Logger logger = LogService.getLogger();
   
   public static void main(String[] args) throws Throwable {
@@ -53,10 +46,4 @@ public class ChildVM {
     }
   }
 
-  private static void createHydraLogWriter() {
-    try {
-      Log.createLogWriter("dunit-childvm", "fine");
-    } catch (HydraRuntimeException ignore) {
-    }
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java b/gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java
index a686204..fb5953b 100644
--- a/gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java
+++ b/gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java
@@ -7,9 +7,6 @@
  */
 package dunit.standalone;
 
-import hydra.Log;
-import hydra.MethExecutorResult;
-
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -40,8 +37,8 @@ import org.apache.logging.log4j.core.config.LoggerConfig;
 import org.apache.logging.log4j.core.layout.PatternLayout;
 import org.junit.Assert;
 
-import batterytest.greplogs.ExpectedStrings;
-import batterytest.greplogs.LogConsumer;
+import com.gemstone.gemfire.test.junit.greplogs.ExpectedStrings;
+import com.gemstone.gemfire.test.junit.greplogs.LogConsumer;
 
 import com.gemstone.gemfire.distributed.Locator;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
@@ -50,6 +47,7 @@ import com.gemstone.gemfire.internal.logging.LogService;
 import dunit.BounceResult;
 import dunit.DUnitEnv;
 import dunit.Host;
+import dunit.MethExecutorResult;
 import dunit.RemoteDUnitVMIF;
 import dunit.SerializableCallable;
 import dunit.VM;
@@ -136,9 +134,6 @@ public class DUnitLauncher {
 
   
   private static void launch() throws URISyntaxException, AlreadyBoundException, IOException, InterruptedException, NotBoundException  {
-//  initialize the log writer that hydra uses
-    Log.createLogWriter( "dunit-master", LOG_LEVEL );
-
     DUNIT_SUSPECT_FILE = new File(SUSPECT_FILENAME);
     DUNIT_SUSPECT_FILE.delete();
     DUNIT_SUSPECT_FILE.deleteOnExit();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2efff3f0/gemfire-core/src/test/java/dunit/standalone/RemoteDUnitVM.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/dunit/standalone/RemoteDUnitVM.java b/gemfire-core/src/test/java/dunit/standalone/RemoteDUnitVM.java
index f3da32f..15712d0 100644
--- a/gemfire-core/src/test/java/dunit/standalone/RemoteDUnitVM.java
+++ b/gemfire-core/src/test/java/dunit/standalone/RemoteDUnitVM.java
@@ -7,9 +7,6 @@
  */
 package dunit.standalone;
 
-import hydra.MethExecutor;
-import hydra.MethExecutorResult;
-
 import java.rmi.RemoteException;
 import java.rmi.server.UnicastRemoteObject;
 
@@ -17,6 +14,8 @@ import org.apache.logging.log4j.Logger;
 
 import com.gemstone.gemfire.internal.logging.LogService;
 
+import dunit.MethExecutor;
+import dunit.MethExecutorResult;
 import dunit.RemoteDUnitVMIF;
 
 /**



Mime
View raw message