You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/04/05 21:38:04 UTC

incubator-geode git commit: Remove dead code

Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-1162 11c090cf8 -> dc8972311


Remove dead code


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

Branch: refs/heads/feature/GEODE-1162
Commit: dc89723112ccf7995d834fe805348ffad7b6d2db
Parents: 11c090c
Author: Kirk Lund <kl...@apache.org>
Authored: Tue Apr 5 12:37:51 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Tue Apr 5 12:37:51 2016 -0700

----------------------------------------------------------------------
 .../com/gemstone/gemfire/test/dunit/VM.java     | 51 +++-----------------
 .../internal/JUnit4DistributedTestCase.java     |  2 -
 2 files changed, 6 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc897231/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java
index b559a6e..40006d2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java
@@ -37,8 +37,6 @@ import com.gemstone.gemfire.test.dunit.standalone.StandAloneDUnitEnv;
 @SuppressWarnings("serial")
 public class VM implements Serializable {
 
-  private static final int MAX_RETRY_COUNT = 0; // was 120 for JDK 1.3 or 1.4 on Windows
-
   /** The host on which this VM runs */
   private Host host;
 
@@ -160,7 +158,7 @@ public class VM implements Serializable {
       throw new RMIException(this, targetClass.getName(), methodName, new IllegalStateException("VM not available: " + this));
     }
 
-    MethExecutorResult result = execute(targetClass, methodName, args, MAX_RETRY_COUNT);
+    MethExecutorResult result = execute(targetClass, methodName, args);
 
     if (!result.exceptionOccurred()) {
       return result.getResult();
@@ -382,7 +380,7 @@ public class VM implements Serializable {
       throw new RMIException(this, targetObject.getClass().getName(), methodName, new IllegalStateException("VM not available: " + this));
     }
 
-    MethExecutorResult result = execute(targetObject, methodName, args, MAX_RETRY_COUNT);
+    MethExecutorResult result = execute(targetObject, methodName, args);
 
     if (!result.exceptionOccurred()) {
       return result.getResult();
@@ -441,60 +439,23 @@ public class VM implements Serializable {
     return DUnitEnv.get().getWorkingDirectory(getPid());
   }
 
-  private MethExecutorResult execute(final Class targetClass, final String methodName, final Object[] args, int retryCount) {
-//    do {
-//
+  private MethExecutorResult execute(final Class targetClass, final String methodName, final Object[] args) {
       try {
         return this.client.executeMethodOnClass(targetClass.getName(), methodName, args);
-
       } catch (RemoteException e) {
-//        boolean isWindows = false;
-//        String os = System.getProperty("os.name");
-//        if (os != null) {
-//          if (os.indexOf("Windows") != -1) {
-//            isWindows = true;
-//          }
-//        }
-//        if (isWindows && retryCount-- > 0) {
-//          boolean interrupted = Thread.interrupted();
-//          try { Thread.sleep(1000); } catch (InterruptedException ignore) {interrupted = true;}
-//          finally {
-//            if (interrupted) {
-//              Thread.currentThread().interrupt();
-//            }
-//          }
-//        } else {
-          throw new RMIException(this, targetClass.getName(), methodName, e );
-//        }
+        throw new RMIException(this, targetClass.getName(), methodName, e );
       }
-//
-//    } while (true);
   }
 
-  private MethExecutorResult execute(final Object targetObject, final String methodName, final Object[] args, int retryCount) {
-//    do {
-
+  private MethExecutorResult execute(final Object targetObject, final String methodName, final Object[] args) {
       try {
         if (args == null) {
           return this.client.executeMethodOnObject(targetObject, methodName);
         } else {
           return this.client.executeMethodOnObject(targetObject, methodName, args);
         }
-
       } catch (RemoteException e) {
-//        if (retryCount-- > 0) {
-//          boolean interrupted = Thread.interrupted();
-//          try { Thread.sleep(1000); } catch (InterruptedException ignore) {interrupted = true;}
-//          finally {
-//            if (interrupted) {
-//              Thread.currentThread().interrupt();
-//            }
-//          }
-//        } else {
-          throw new RMIException(this, targetObject.getClass().getName(), methodName, e );
-//        }
+        throw new RMIException(this, targetObject.getClass().getName(), methodName, e );
       }
-
-//    } while (true);
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc897231/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
index 30940b7..6a08e81 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
@@ -70,8 +70,6 @@ import com.gemstone.gemfire.test.junit.rules.serializable.SerializableTestName;
 
 /**
  * This class is the base class for all distributed tests using JUnit 4.
- *
- * TODO: make this class abstract when JUnit3DistributedTestCase is deleted
  */
 public abstract class JUnit4DistributedTestCase implements DistributedTestFixture, Serializable {