geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [10/18] incubator-geode git commit: Remove dead code
Date Tue, 12 Apr 2016 21:16:35 GMT
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-17-2
Commit: dc89723112ccf7995d834fe805348ffad7b6d2db
Parents: 11c090c
Author: Kirk Lund <klund@apache.org>
Authored: Tue Apr 5 12:37:51 2016 -0700
Committer: Kirk Lund <klund@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
{
 


Mime
View raw message