GEODE-269 :  Removing deprecated API's from FunctionService.

        * Modified test cases after removing deprecated API's

        This closes #526


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

Branch: refs/heads/feature/GEODE-2632-17
Commit: 18db4bf382ffbf16de04f5d3dc9462677af341e4
Parents: d88d2de
Author: Deepak Dixit <deepakdixit2...@gmail.com>
Authored: Tue May 23 09:47:13 2017 +0530
Committer: nabarunnag <n...@cs.wisc.edu>
Committed: Mon May 22 22:53:14 2017 -0700

----------------------------------------------------------------------
 .../catalina/PeerToPeerSessionCache.java        |  2 +-
 .../modules/util/BootstrappingFunction.java     |  2 +-
 .../geode/cache/execute/FunctionService.java    | 49 --------------------
 .../management/MemoryThresholdsDUnitTest.java   | 32 ++++++-------
 .../ClassPathLoaderIntegrationTest.java         |  6 +--
 .../geode/internal/cache/CommitFunction.java    |  3 +-
 .../cache/RemoteTransactionDUnitTest.java       | 12 ++---
 .../geode/internal/cache/RollbackFunction.java  |  3 +-
 .../execute/FunctionServiceStatsDUnitTest.java  |  2 +-
 .../LocalFunctionExecutionDUnitTest.java        |  4 +-
 .../MemberFunctionExecutionDUnitTest.java       | 33 +++++++------
 .../DeployCommandRedeployDUnitTest.java         |  3 +-
 .../cli/commands/ShowDeadlockDUnitTest.java     |  3 +-
 13 files changed, 49 insertions(+), 105 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/18db4bf3/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/PeerToPeerSessionCache.java
----------------------------------------------------------------------
diff --git 
a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/PeerToPeerSessionCache.java
 
b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/PeerToPeerSessionCache.java
index 69d6ec0..f1afca3 100644
--- 
a/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/PeerToPeerSessionCache.java
+++ 
b/extensions/geode-modules/src/main/java/org/apache/geode/modules/session/catalina/PeerToPeerSessionCache.java
@@ -90,7 +90,7 @@ public class PeerToPeerSessionCache extends 
AbstractSessionCache {
       collector = execution.execute(TouchPartitionedRegionEntriesFunction.ID, 
true, false, true);
     } else {
       // Execute the member touch function on all the server(s)
-      Execution execution = 
FunctionService.onMembers(getCache().getDistributedSystem())
+      Execution execution = FunctionService.onMembers()
           .setArguments(new Object[] {this.sessionRegion.getFullPath(), 
sessionIds});
       collector = execution.execute(TouchReplicatedRegionEntriesFunction.ID, 
true, false, false);
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/18db4bf3/extensions/geode-modules/src/main/java/org/apache/geode/modules/util/BootstrappingFunction.java
----------------------------------------------------------------------
diff --git 
a/extensions/geode-modules/src/main/java/org/apache/geode/modules/util/BootstrappingFunction.java
 
b/extensions/geode-modules/src/main/java/org/apache/geode/modules/util/BootstrappingFunction.java
index 64ecef3..a0e3e85 100644
--- 
a/extensions/geode-modules/src/main/java/org/apache/geode/modules/util/BootstrappingFunction.java
+++ 
b/extensions/geode-modules/src/main/java/org/apache/geode/modules/util/BootstrappingFunction.java
@@ -115,7 +115,7 @@ public class BootstrappingFunction implements Function, 
MembershipListener {
   private void bootstrapMember(InternalDistributedMember member) {
     // Create and execute the function
     Cache cache = CacheFactory.getAnyInstance();
-    Execution execution = 
FunctionService.onMember(cache.getDistributedSystem(), member);
+    Execution execution = FunctionService.onMember(member);
     ResultCollector collector = execution.execute(this);
 
     // Get the result. Nothing is being done with it.

http://git-wip-us.apache.org/repos/asf/geode/blob/18db4bf3/geode-core/src/main/java/org/apache/geode/cache/execute/FunctionService.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/cache/execute/FunctionService.java 
b/geode-core/src/main/java/org/apache/geode/cache/execute/FunctionService.java
index 8f64caf..8489275 100755
--- 
a/geode-core/src/main/java/org/apache/geode/cache/execute/FunctionService.java
+++ 
b/geode-core/src/main/java/org/apache/geode/cache/execute/FunctionService.java
@@ -135,55 +135,6 @@ public class FunctionService {
 
   /**
    * Returns an {@link Execution} object that can be used to execute a data 
independent function on
-   * a {@link DistributedMember} of the {@link DistributedSystem}. If the 
member is not found in the
-   * system, the function execution will throw an Exception. If the member 
goes down while
-   * dispatching or executing the function on the member, an Exception will be 
thrown.
-   * 
-   * @param system defines the distributed system
-   * @param distributedMember defines a member in the distributed system
-   * @return Execution
-   * @throws FunctionException if either input parameter is null
-   * @since GemFire 6.0
-   * @deprecated use {@link #onMember(DistributedMember)} instead
-   */
-  public static Execution onMember(DistributedSystem system, DistributedMember 
distributedMember) {
-    return functionSvcMgr.onMember(system, distributedMember);
-  }
-
-  /**
-   * Returns an {@link Execution} object that can be used to execute a data 
independent function on
-   * all members of the {@link DistributedSystem}. If one of the members goes 
down while dispatching
-   * or executing the function on the member, an Exception will be thrown.
-   * 
-   * @param system defines the distributed system
-   * @return Execution
-   * 
-   * @throws FunctionException if DistributedSystem instance passed is null
-   * @since GemFire 6.0
-   * @deprecated use {@link #onMember(String...)} instead
-   */
-  public static Execution onMembers(DistributedSystem system) {
-    return functionSvcMgr.onMembers(system);
-  }
-
-  /**
-   * Returns an {@link Execution} object that can be used to execute a data 
independent function on
-   * the set of {@link DistributedMember}s of the {@link DistributedSystem}. 
If one of the members
-   * goes down while dispatching or executing the function, an Exception will 
be thrown.
-   * 
-   * @param system defines the distributed system
-   * @param distributedMembers set of distributed members on which {@link 
Function} to be executed
-   * @throws FunctionException if DistributedSystem instance passed is null
-   * @since GemFire 6.0
-   * @deprecated use {@link #onMembers(Set)} instead
-   */
-  public static Execution onMembers(DistributedSystem system,
-      Set<DistributedMember> distributedMembers) {
-    return functionSvcMgr.onMembers(system, distributedMembers);
-  }
-
-  /**
-   * Returns an {@link Execution} object that can be used to execute a data 
independent function on
    * a {@link DistributedMember}. If the member is not found, executing the 
function will throw an
    * Exception. If the member goes down while dispatching or executing the 
function on the member,
    * an Exception will be thrown.

http://git-wip-us.apache.org/repos/asf/geode/blob/18db4bf3/geode-core/src/test/java/org/apache/geode/cache/management/MemoryThresholdsDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/cache/management/MemoryThresholdsDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/cache/management/MemoryThresholdsDUnitTest.java
index 8af44eb..9017fc2 100644
--- 
a/geode-core/src/test/java/org/apache/geode/cache/management/MemoryThresholdsDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/cache/management/MemoryThresholdsDUnitTest.java
@@ -906,8 +906,8 @@ public class MemoryThresholdsDUnitTest extends 
ClientServerTestCase {
     // should not fail
     server1.invoke(new SerializableCallable() {
       public Object call() throws Exception {
-        FunctionService.onMembers(getSystem()).execute(function);
-        FunctionService.onMembers(getSystem()).execute(function2);
+        FunctionService.onMembers().execute(function);
+        FunctionService.onMembers().execute(function2);
         return null;
       }
     });
@@ -944,13 +944,13 @@ public class MemoryThresholdsDUnitTest extends 
ClientServerTestCase {
       public Object call() throws Exception {
         try {
           getCache().getLoggerI18n().fine(addExpectedFunctionExString);
-          FunctionService.onMembers(getSystem()).execute(function);
+          FunctionService.onMembers().execute(function);
           getCache().getLoggerI18n().fine(removeExpectedFunctionExString);
           fail("expected low memory exception was not thrown");
         } catch (LowMemoryException e) {
           // expected
         }
-        FunctionService.onMembers(getSystem()).execute(function2);
+        FunctionService.onMembers().execute(function2);
         return null;
       }
     });
@@ -1031,8 +1031,8 @@ public class MemoryThresholdsDUnitTest extends 
ClientServerTestCase {
     // should not fail
     accessor.invoke(new SerializableCallable() {
       public Object call() throws Exception {
-        FunctionService.onMembers(getSystem()).execute(function);
-        FunctionService.onMembers(getSystem()).execute(function2);
+        FunctionService.onMembers().execute(function);
+        FunctionService.onMembers().execute(function2);
         return null;
       }
     });
@@ -1067,13 +1067,13 @@ public class MemoryThresholdsDUnitTest extends 
ClientServerTestCase {
       public Object call() throws Exception {
         try {
           getCache().getLoggerI18n().fine(addExpectedFunctionExString);
-          FunctionService.onMembers(getSystem()).execute(function);
+          FunctionService.onMembers().execute(function);
           getCache().getLoggerI18n().fine(removeExpectedFunctionExString);
           fail("expected low memory exception was not thrown");
         } catch (LowMemoryException e) {
           // expected
         }
-        FunctionService.onMembers(getSystem()).execute(function2);
+        FunctionService.onMembers().execute(function2);
         return null;
       }
     });
@@ -1205,10 +1205,10 @@ public class MemoryThresholdsDUnitTest extends 
ClientServerTestCase {
 
     server2.invoke(new SerializableCallable() {
       public Object call() throws Exception {
-        FunctionService.onMembers(getSystem()).execute(function);
-        FunctionService.onMember(getSystem(), s1).execute(function);
-        FunctionService.onMembers(getSystem()).execute(function2);
-        FunctionService.onMember(getSystem(), s1).execute(function2);
+        FunctionService.onMembers().execute(function);
+        FunctionService.onMember(s1).execute(function);
+        FunctionService.onMembers().execute(function2);
+        FunctionService.onMember(s1).execute(function2);
         return null;
       }
     });
@@ -1241,19 +1241,19 @@ public class MemoryThresholdsDUnitTest extends 
ClientServerTestCase {
     server2.invoke(new SerializableCallable() {
       public Object call() throws Exception {
         try {
-          FunctionService.onMembers(getSystem()).execute(function);
+          FunctionService.onMembers().execute(function);
           fail("expected LowMemoryExcception was not thrown");
         } catch (LowMemoryException e) {
           // expected
         }
         try {
-          FunctionService.onMember(getSystem(), s1).execute(function);
+          FunctionService.onMember(s1).execute(function);
           fail("expected LowMemoryExcception was not thrown");
         } catch (LowMemoryException e) {
           // expected
         }
-        FunctionService.onMembers(getSystem()).execute(function2);
-        FunctionService.onMember(getSystem(), s1).execute(function2);
+        FunctionService.onMembers().execute(function2);
+        FunctionService.onMember(s1).execute(function2);
         return null;
       }
     });

http://git-wip-us.apache.org/repos/asf/geode/blob/18db4bf3/geode-core/src/test/java/org/apache/geode/internal/ClassPathLoaderIntegrationTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/ClassPathLoaderIntegrationTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/ClassPathLoaderIntegrationTest.java
index b4776bf..721e502 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/ClassPathLoaderIntegrationTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/ClassPathLoaderIntegrationTest.java
@@ -243,8 +243,7 @@ public class ClassPathLoaderIntegrationTest {
 
     GemFireCacheImpl gemFireCache = GemFireCacheImpl.getInstance();
     DistributedSystem distributedSystem = gemFireCache.getDistributedSystem();
-    Execution execution =
-        FunctionService.onMember(distributedSystem, 
distributedSystem.getDistributedMember());
+    Execution execution = 
FunctionService.onMember(distributedSystem.getDistributedMember());
     ResultCollector resultCollector = 
execution.execute("JarDeployerDUnitFunction");
     @SuppressWarnings("unchecked")
     List<String> result = (List<String>) resultCollector.getResult();
@@ -268,8 +267,7 @@ public class ClassPathLoaderIntegrationTest {
         FileUtils.readFileToByteArray(jarVersion1));
 
     assertThatClassCanBeLoaded("jddunit.function.MyFunction");
-    Execution execution =
-        FunctionService.onMember(distributedSystem, 
distributedSystem.getDistributedMember());
+    Execution execution = 
FunctionService.onMember(distributedSystem.getDistributedMember());
 
     List<String> result = (List<String>) 
execution.execute("MyFunction").getResult();
     assertThat(result.get(0)).isEqualTo("Version1");

http://git-wip-us.apache.org/repos/asf/geode/blob/18db4bf3/geode-core/src/test/java/org/apache/geode/internal/cache/CommitFunction.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/CommitFunction.java 
b/geode-core/src/test/java/org/apache/geode/internal/cache/CommitFunction.java
index c66901a..4c062cc 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/CommitFunction.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/CommitFunction.java
@@ -101,8 +101,7 @@ public class CommitFunction implements Function {
       ArrayList args = new ArrayList();
       args.add(txId);
       args.add(NestedTransactionFunction.COMMIT);
-      Execution ex =
-          FunctionService.onMember(cache.getDistributedSystem(), 
member).setArguments(args);
+      Execution ex = FunctionService.onMember(member).setArguments(args);
       if (isDebugEnabled) {
         logger.debug(
             "CommitFunction: for transaction: {} executing 
NestedTransactionFunction on member: {}",

http://git-wip-us.apache.org/repos/asf/geode/blob/18db4bf3/geode-core/src/test/java/org/apache/geode/internal/cache/RemoteTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/RemoteTransactionDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/RemoteTransactionDUnitTest.java
index bc8bfb6..3c4908c 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/RemoteTransactionDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/RemoteTransactionDUnitTest.java
@@ -2498,7 +2498,7 @@ public class RemoteTransactionDUnitTest extends 
JUnit4CacheTestCase {
               
FunctionService.onRegion(custRegion).execute(TXFunction.id).getResult();
               break;
             case OnMember:
-              
FunctionService.onMembers(basicGetSystem()).execute(TXFunction.id).getResult();
+              FunctionService.onMembers().execute(TXFunction.id).getResult();
               break;
           }
           fail("Expected exception not thrown");
@@ -2519,7 +2519,7 @@ public class RemoteTransactionDUnitTest extends 
JUnit4CacheTestCase {
           case OnMember:
             DistributedMember owner =
                 
custRegion.getOwnerForKey(custRegion.getKeyInfo(expectedCustId));
-            FunctionService.onMember(basicGetSystem(), 
owner).execute(TXFunction.id).getResult();
+            FunctionService.onMember(owner).execute(TXFunction.id).getResult();
             break;
         }
         TXStateProxy tx = mgr.internalSuspend();
@@ -2565,7 +2565,7 @@ public class RemoteTransactionDUnitTest extends 
JUnit4CacheTestCase {
           case OnMember:
             DistributedMember owner =
                 
custRegion.getOwnerForKey(custRegion.getKeyInfo(expectedCustId));
-            FunctionService.onMember(basicGetSystem(), 
owner).execute(TXFunction.id).getResult();
+            FunctionService.onMember(owner).execute(TXFunction.id).getResult();
             break;
         }
         TXStateProxy tx = mgr.internalSuspend();
@@ -2833,11 +2833,11 @@ public class RemoteTransactionDUnitTest extends 
JUnit4CacheTestCase {
         members.add(ds1);
         members.add(ds2);
         try {
-          FunctionService.onMembers(basicGetSystem(), 
members).execute(TXFunction.id).getResult();
+          
FunctionService.onMembers(members).execute(TXFunction.id).getResult();
           fail("expected exception not thrown");
         } catch (TransactionException expected) {
         }
-        FunctionService.onMember(basicGetSystem(), 
owner).execute(TXFunction.id).getResult();
+        FunctionService.onMember(owner).execute(TXFunction.id).getResult();
         assertEquals(expectedCustomer, pr.get(expectedCustId));
         TXStateProxy tx = mgr.internalSuspend();
         assertNull(pr.get(expectedCustId));
@@ -2928,7 +2928,7 @@ public class RemoteTransactionDUnitTest extends 
JUnit4CacheTestCase {
         } catch (TransactionDataRebalancedException expected) {
         }
         try {
-          FunctionService.onMember(basicGetSystem(), 
ds2).execute(TXFunction.id).getResult();
+          FunctionService.onMember(ds2).execute(TXFunction.id).getResult();
           fail("expected exception not thrown");
         } catch (TransactionDataNotColocatedException expected) {
         }

http://git-wip-us.apache.org/repos/asf/geode/blob/18db4bf3/geode-core/src/test/java/org/apache/geode/internal/cache/RollbackFunction.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/RollbackFunction.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/RollbackFunction.java
index 8ec7d2d..6d47e56 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/RollbackFunction.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/RollbackFunction.java
@@ -100,8 +100,7 @@ public class RollbackFunction implements Function {
       ArrayList args = new ArrayList();
       args.add(txId);
       args.add(NestedTransactionFunction.ROLLBACK);
-      Execution ex =
-          FunctionService.onMember(cache.getDistributedSystem(), 
member).setArguments(args);
+      Execution ex = FunctionService.onMember(member).setArguments(args);
       if (isDebugEnabled) {
         logger.debug(
             "RollbackFunction: for transaction: {} executing 
NestedTransactionFunction on member: {}",

http://git-wip-us.apache.org/repos/asf/geode/blob/18db4bf3/geode-core/src/test/java/org/apache/geode/internal/cache/execute/FunctionServiceStatsDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/FunctionServiceStatsDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/FunctionServiceStatsDUnitTest.java
index a2a6667..1fa523c 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/FunctionServiceStatsDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/FunctionServiceStatsDUnitTest.java
@@ -1057,7 +1057,7 @@ public class FunctionServiceStatsDUnitTest extends 
PRClientServerTestBase {
         assertNotNull(ds);
         Execution memberExecution = null;
         DistributedMember localmember = ds.getDistributedMember();
-        memberExecution = FunctionService.onMember(ds, localmember);
+        memberExecution = FunctionService.onMember(localmember);
 
         memberExecution.setArguments("Key");
         try {

http://git-wip-us.apache.org/repos/asf/geode/blob/18db4bf3/geode-core/src/test/java/org/apache/geode/internal/cache/execute/LocalFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/LocalFunctionExecutionDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/LocalFunctionExecutionDUnitTest.java
index 5b6f065..670e751 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/LocalFunctionExecutionDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/LocalFunctionExecutionDUnitTest.java
@@ -156,8 +156,8 @@ public class LocalFunctionExecutionDUnitTest extends 
JUnit4DistributedTestCase {
       Function function1 = new TestFunction(true, 
TestFunction.TEST_FUNCTION_EXCEPTION);
       FunctionService.registerFunction(function1);
       DistributedMember localmember = getSystemStatic().getDistributedMember();
-      ResultCollector rc = FunctionService.onMember(getSystemStatic(), 
localmember)
-          .setArguments(Boolean.TRUE).execute(function1.getId());
+      ResultCollector rc = 
FunctionService.onMember(localmember).setArguments(Boolean.TRUE)
+          .execute(function1.getId());
       rc.getResult();
       Assert.fail("Exception should occur", new Exception("Test Failed"));
     } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/geode/blob/18db4bf3/geode-core/src/test/java/org/apache/geode/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
index d14a212..f997ea2 100755
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
@@ -171,8 +171,7 @@ public class MemberFunctionExecutionDUnitTest extends 
JUnit4CacheTestCase {
     Constructor<Function> constructor = clazz.getConstructor();
     Function function = (Function) constructor.newInstance();
 
-    DistributedSystem distributedSystem = getSystem();
-    Execution execution = FunctionService.onMembers(distributedSystem);
+    Execution execution = FunctionService.onMembers();
     ResultCollector resultCollector = execution.execute(function);
     try {
       resultCollector.getResult();
@@ -203,7 +202,7 @@ public class MemberFunctionExecutionDUnitTest extends 
JUnit4CacheTestCase {
     member3.invoke(() -> 
MemberFunctionExecutionDUnitTest.connectToDistributedSystem(props));
     member4.invoke(() -> 
MemberFunctionExecutionDUnitTest.connectToDistributedSystem(props));
     connectToDistributedSystem(props);
-    AbstractExecution exe = (AbstractExecution) 
FunctionService.onMembers(getSystem());
+    AbstractExecution exe = (AbstractExecution) FunctionService.onMembers();
     exe.setIgnoreDepartedMembers(true);
     ResultCollector rs = exe.execute(new FunctionAdapter() {
       @Override
@@ -378,7 +377,7 @@ public class MemberFunctionExecutionDUnitTest extends 
JUnit4CacheTestCase {
 
     DistributedMember localmember = ds.getDistributedMember();
     Execution memberExcution = null;
-    memberExcution = FunctionService.onMember(ds, localmember);
+    memberExcution = FunctionService.onMember(localmember);
     Execution executor = memberExcution.setArguments("Key");
     try {
       ResultCollector rc = executor.execute(new FunctionAdapter() {
@@ -427,12 +426,12 @@ public class MemberFunctionExecutionDUnitTest extends 
JUnit4CacheTestCase {
     Map memArgs = new HashMap();
     if (noOfMembers.intValue() == 1) { // Local VM
       DistributedMember localmember = ds.getDistributedMember();
-      memberExcution = (InternalExecution) FunctionService.onMember(ds, 
localmember);
+      memberExcution = (InternalExecution) 
FunctionService.onMember(localmember);
       memArgs.put(localmember.getId(), localmember.getId());
       MemberMappedArgument args = new MemberMappedArgument("Key", memArgs);
       executor = memberExcution.withMemberMappedArgument(args);
     } else if (noOfMembers.intValue() == 5) {
-      memberExcution = (InternalExecution) FunctionService.onMembers(ds);
+      memberExcution = (InternalExecution) FunctionService.onMembers();
       Set memberSet = new 
HashSet(ds.getDistributionManager().getNormalDistributionManagerIds());
       Iterator iter = memberSet.iterator();
       while (iter.hasNext()) {
@@ -451,7 +450,7 @@ public class MemberFunctionExecutionDUnitTest extends 
JUnit4CacheTestCase {
         memArgs.put(member.getId(), member.getId());
       }
       MemberMappedArgument args = new MemberMappedArgument("Key", memArgs);
-      memberExcution = (InternalExecution) FunctionService.onMembers(ds, 
memberSet);
+      memberExcution = (InternalExecution) 
FunctionService.onMembers(memberSet);
       executor = memberExcution.withMemberMappedArgument(args);
     }
     try {
@@ -478,9 +477,9 @@ public class MemberFunctionExecutionDUnitTest extends 
JUnit4CacheTestCase {
     Map memArgs = new HashMap();
     if (noOfMembers.intValue() == 1) { // Local VM
       DistributedMember localmember = ds.getDistributedMember();
-      memberExcution = (InternalExecution) FunctionService.onMember(ds, 
localmember);
+      memberExcution = (InternalExecution) 
FunctionService.onMember(localmember);
     } else if (noOfMembers.intValue() == 5) {
-      memberExcution = (InternalExecution) FunctionService.onMembers(ds);
+      memberExcution = (InternalExecution) FunctionService.onMembers();
     } else {
       Set memberSet = new 
HashSet(ds.getDistributionManager().getNormalDistributionManagerIds());
       InternalDistributedMember localVM = 
ds.getDistributionManager().getDistributionManagerId();
@@ -489,7 +488,7 @@ public class MemberFunctionExecutionDUnitTest extends 
JUnit4CacheTestCase {
       while (iter.hasNext()) {
         InternalDistributedMember member = (InternalDistributedMember) 
iter.next();
       }
-      memberExcution = (InternalExecution) FunctionService.onMembers(ds, 
memberSet);
+      memberExcution = (InternalExecution) 
FunctionService.onMembers(memberSet);
     }
     try {
       ResultCollector rc = 
memberExcution.setArguments(Boolean.TRUE).execute(function);
@@ -515,12 +514,12 @@ public class MemberFunctionExecutionDUnitTest extends 
JUnit4CacheTestCase {
     Map memArgs = new HashMap();
     if (noOfMembers.intValue() == 1) { // Local VM
       DistributedMember localmember = ds.getDistributedMember();
-      memberExcution = (InternalExecution) FunctionService.onMember(ds, 
localmember);
+      memberExcution = (InternalExecution) 
FunctionService.onMember(localmember);
       memArgs.put(localmember.getId(), localmember.getId());
       MemberMappedArgument args = new MemberMappedArgument("Key", memArgs);
       executor = memberExcution.withMemberMappedArgument(args);
     } else if (noOfMembers.intValue() == 5) {
-      memberExcution = (InternalExecution) FunctionService.onMembers(ds);
+      memberExcution = (InternalExecution) FunctionService.onMembers();
       Set memberSet = new 
HashSet(ds.getDistributionManager().getNormalDistributionManagerIds());
       Iterator iter = memberSet.iterator();
       while (iter.hasNext()) {
@@ -539,7 +538,7 @@ public class MemberFunctionExecutionDUnitTest extends 
JUnit4CacheTestCase {
         memArgs.put(member.getId(), member.getId());
       }
       MemberMappedArgument args = new MemberMappedArgument("Key", memArgs);
-      memberExcution = (InternalExecution) FunctionService.onMembers(ds, 
memberSet);
+      memberExcution = (InternalExecution) 
FunctionService.onMembers(memberSet);
       executor = memberExcution.withMemberMappedArgument(args);
     }
     try {
@@ -560,14 +559,14 @@ public class MemberFunctionExecutionDUnitTest extends 
JUnit4CacheTestCase {
     Execution memberExcution = null;
     if (noOfMembers.intValue() == 1) { // Local VM
       DistributedMember localmember = ds.getDistributedMember();
-      memberExcution = FunctionService.onMember(ds, localmember);
+      memberExcution = FunctionService.onMember(localmember);
     } else if (noOfMembers.intValue() == 5) {
-      memberExcution = FunctionService.onMembers(ds);
+      memberExcution = FunctionService.onMembers();
     } else {
       Set memberSet = new 
HashSet(ds.getDistributionManager().getNormalDistributionManagerIds());
       InternalDistributedMember localVM = 
ds.getDistributionManager().getDistributionManagerId();
       memberSet.remove(localVM);
-      memberExcution = FunctionService.onMembers(ds, memberSet);
+      memberExcution = FunctionService.onMembers(memberSet);
     }
     Execution executor = memberExcution.setArguments("Key");
     try {
@@ -611,7 +610,7 @@ public class MemberFunctionExecutionDUnitTest extends 
JUnit4CacheTestCase {
   public static void excuteOnMembersNoResult() {
     assertNotNull(ds);
     Function function = new TestFunction(false, TEST_FUNCTION6);
-    Execution memberExcution = FunctionService.onMembers(ds);
+    Execution memberExcution = FunctionService.onMembers();
     Execution executor = memberExcution.setArguments("Key");
     try {
       ResultCollector rc = executor.execute(function.getId());

http://git-wip-us.apache.org/repos/asf/geode/blob/18db4bf3/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DeployCommandRedeployDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DeployCommandRedeployDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DeployCommandRedeployDUnitTest.java
index 785915a..e494bcd 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DeployCommandRedeployDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DeployCommandRedeployDUnitTest.java
@@ -166,8 +166,7 @@ public class DeployCommandRedeployDUnitTest implements 
Serializable {
   private void assertThatFunctionHasVersion(String functionId, String version) 
{
     GemFireCacheImpl gemFireCache = GemFireCacheImpl.getInstance();
     DistributedSystem distributedSystem = gemFireCache.getDistributedSystem();
-    Execution execution =
-        FunctionService.onMember(distributedSystem, 
distributedSystem.getDistributedMember());
+    Execution execution = 
FunctionService.onMember(distributedSystem.getDistributedMember());
     List<String> result = (List<String>) 
execution.execute(functionId).getResult();
     assertThat(result.get(0)).isEqualTo(version);
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/18db4bf3/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowDeadlockDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowDeadlockDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowDeadlockDUnitTest.java
index b6e7c36..e7ae38e 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowDeadlockDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowDeadlockDUnitTest.java
@@ -173,8 +173,7 @@ public class ShowDeadlockDUnitTest extends 
JUnit4CacheTestCase {
     vm0.invokeAsync(() -> {
       lock.lock();
 
-      ResultCollector collector =
-          FunctionService.onMember(basicGetSystem(), member).execute(new 
TestFunction());
+      ResultCollector collector = FunctionService.onMember(member).execute(new 
TestFunction());
       // wait the function to lock the lock on member.
       collector.getResult();
       lock.unlock();

Reply via email to