geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [49/56] [abbrv] incubator-geode git commit: Automatically converting calls of vm.invoke to lambdas
Date Tue, 16 Feb 2016 22:12:09 GMT
Automatically converting calls of vm.invoke to lambdas

This is an automatic conversion of many of the calls to vm.invoke that
take a string to instead use a lambda.

This was done using the following perl search/replace expressions on all
dunit tests.
perl -i -0pe 's/.\s*invoke(?:Boolean|Int|Long|)(Async|)\(\s*(\w+)(?:\.class|\.getClass\(\))\s*,\s*"([^"]+)",\s*new\s+Object\[\]\s*{([^}]*)}\s*\)/.invoke$1(() -> $2.$3($4))/mg' $1
perl -i -0pe 's/.\s*invoke(?:Boolean|Int|Long|)(Async|)\(\s*(\w+)(?:\.class|\.getClass\(\))\s*,\s*"([^"]+)"\s*\)/.invoke$1(() -> $2.$3())/mg' $1
perl -i -0pe 's/.\s*invoke(?:Boolean|Int|Long|)(Async|)\(\s*getClass\(\)\s*,\s*"([^"]+)",\s*new\s+Object\[\]\s*{([^}]*)}\s*\)/.invoke$1(() -> $2($3))/mg' $1
perl -i -0pe 's/.\s*invoke(?:Boolean|Int|Long|)(Async|)\(\s*getClass\(\)\s*,\s*"([^"]+)"\s*\)/.invoke$1(() -> $2())/mg' $1


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

Branch: refs/heads/feature/GEODE-866
Commit: 69024aa9946d1c2da2ca7245e6ad62f8ff025cb8
Parents: 5350890
Author: Dan Smith <upthewaterspout@apache.org>
Authored: Thu Feb 11 11:16:38 2016 -0800
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Tue Feb 16 14:07:22 2016 -0800

----------------------------------------------------------------------
 .../cache/CacheRegionClearStatsDUnitTest.java   |   36 +-
 .../cache/ClientServerTimeSyncDUnitTest.java    |    4 +-
 .../CacheServerSSLConnectionDUnitTest.java      |   44 +-
 .../internal/SSLNoClientAuthDUnitTest.java      |   14 +-
 .../management/MemoryThresholdsDUnitTest.java   |   10 +-
 .../MemoryThresholdsOffHeapDUnitTest.java       |   10 +-
 .../query/dunit/PdxStringQueryDUnitTest.java    |   42 +-
 .../dunit/QueryDataInconsistencyDUnitTest.java  |   12 +-
 .../QueryUsingFunctionContextDUnitTest.java     |   39 +-
 .../query/dunit/QueryUsingPoolDUnitTest.java    |   32 +-
 .../cache/query/dunit/RemoteQueryDUnitTest.java |   18 +-
 ...rrentIndexInitOnOverflowRegionDUnitTest.java |    3 +-
 .../index/PutAllWithIndexPerfDUnitTest.java     |    2 +-
 .../gemfire/cache30/Bug34387DUnitTest.java      |    2 +-
 .../gemfire/cache30/CacheMapTxnDUnitTest.java   |   20 +-
 .../cache30/CachedAllEventsDUnitTest.java       |    2 +-
 .../gemfire/cache30/CallbackArgDUnitTest.java   |    2 +-
 .../cache30/ClearMultiVmCallBkDUnitTest.java    |   18 +-
 .../gemfire/cache30/ClearMultiVmDUnitTest.java  |   18 +-
 .../cache30/ClientMembershipDUnitTest.java      |   30 +-
 .../ClientRegisterInterestDUnitTest.java        |    9 +-
 .../cache30/DistAckMapMethodsDUnitTest.java     |   44 +-
 .../DistributedNoAckRegionCCEDUnitTest.java     |   28 +-
 .../gemfire/cache30/MultiVMRegionTestCase.java  |   68 +-
 .../cache30/PartitionedRegionDUnitTest.java     |    2 +-
 .../gemfire/cache30/ProxyDUnitTest.java         |    2 +-
 .../cache30/PutAllCallBkRemoteVMDUnitTest.java  |    8 +-
 .../cache30/PutAllCallBkSingleVMDUnitTest.java  |   10 +-
 .../gemfire/cache30/PutAllMultiVmDUnitTest.java |    8 +-
 .../gemfire/cache30/ReconnectDUnitTest.java     |    6 +-
 .../RegionMembershipListenerDUnitTest.java      |    2 +-
 .../cache30/RemoveAllMultiVmDUnitTest.java      |    8 +-
 .../cache30/RolePerformanceDUnitTest.java       |    3 +-
 .../gemfire/cache30/SearchAndLoadDUnitTest.java |    4 +-
 .../gemfire/cache30/TXDistributedDUnitTest.java |   12 +-
 .../gemfire/cache30/TXOrderDUnitTest.java       |    2 +-
 .../gemfire/distributed/LocatorDUnitTest.java   |   25 +-
 .../LocatorLauncherLocalJUnitTest.java          |    4 +-
 .../LocatorLauncherRemoteJUnitTest.java         |    2 +-
 .../ServerLauncherLocalJUnitTest.java           |    4 +-
 .../ServerLauncherRemoteJUnitTest.java          |    2 +-
 .../ConsoleDistributionManagerDUnitTest.java    |    7 +-
 .../gemfire/disttx/CacheMapDistTXDUnitTest.java |    8 +-
 .../gemfire/disttx/DistTXDebugDUnitTest.java    |   20 +-
 .../disttx/DistributedTransactionDUnitTest.java |    2 +-
 .../internal/cache/Bug33359DUnitTest.java       |    8 +-
 .../internal/cache/Bug33726DUnitTest.java       |   10 +-
 .../internal/cache/Bug37241DUnitTest.java       |   26 +-
 .../internal/cache/Bug39079DUnitTest.java       |   19 +-
 .../internal/cache/Bug41733DUnitTest.java       |    2 +-
 .../internal/cache/ClearDAckDUnitTest.java      |   24 +-
 .../internal/cache/ClearGlobalDUnitTest.java    |    6 +-
 .../cache/DeltaPropagationDUnitTest.java        |  320 ++-
 .../cache/DeltaPropagationStatsDUnitTest.java   |  120 +-
 .../cache/DiskRegByteArrayDUnitTest.java        |   14 +-
 .../cache/DistributedCacheTestCase.java         |    5 +-
 .../internal/cache/EventTrackerDUnitTest.java   |    6 +-
 .../internal/cache/EvictionStatsDUnitTest.java  |   12 +-
 .../internal/cache/EvictionTestBase.java        |    9 +-
 .../cache/FixedPRSinglehopDUnitTest.java        |  156 +-
 .../internal/cache/GIIDeltaDUnitTest.java       |   84 +-
 .../internal/cache/HABug36773DUnitTest.java     |   46 +-
 .../HAOverflowMemObjectSizerDUnitTest.java      |   48 +-
 .../internal/cache/MapClearGIIDUnitTest.java    |   17 +-
 .../cache/P2PDeltaPropagationDUnitTest.java     |  105 +-
 .../PartitionedRegionSingleHopDUnitTest.java    |  460 ++--
 ...RegionSingleHopWithServerGroupDUnitTest.java |  243 +-
 .../internal/cache/PutAllDAckDUnitTest.java     |   12 +-
 .../internal/cache/PutAllGlobalDUnitTest.java   |   12 +-
 .../internal/cache/RemoveAllDAckDUnitTest.java  |   12 +-
 .../internal/cache/RemoveDAckDUnitTest.java     |   10 +-
 .../internal/cache/RemoveGlobalDUnitTest.java   |   12 +-
 .../internal/cache/SingleHopStatsDUnitTest.java |   60 +-
 .../internal/cache/SystemFailureDUnitTest.java  |    4 +-
 .../cache/execute/Bug51193DUnitTest.java        |   16 +-
 .../ClientServerFunctionExecutionDUnitTest.java |  142 +-
 .../execute/ColocationFailoverDUnitTest.java    |   43 +-
 ...ributedRegionFunctionExecutionDUnitTest.java |  875 +++----
 .../cache/execute/LocalDataSetDUnitTest.java    |   26 +-
 .../LocalFunctionExecutionDUnitTest.java        |   16 +-
 .../MemberFunctionExecutionDUnitTest.java       |   59 +-
 .../MultiRegionFunctionExecutionDUnitTest.java  |    8 +-
 ...ntServerFunctionExecutionNoAckDUnitTest.java |   12 +-
 ...tServerRegionFunctionExecutionDUnitTest.java |   97 +-
 ...egionFunctionExecutionFailoverDUnitTest.java |  236 +-
 ...onFunctionExecutionNoSingleHopDUnitTest.java |  174 +-
 ...onExecutionSelectorNoSingleHopDUnitTest.java |  162 +-
 ...gionFunctionExecutionSingleHopDUnitTest.java |  130 +-
 .../cache/execute/PRClientServerTestBase.java   |  147 +-
 .../cache/execute/PRColocationDUnitTest.java    |  219 +-
 .../execute/PRCustomPartitioningDUnitTest.java  |    8 +-
 .../execute/PRFunctionExecutionDUnitTest.java   |    8 +-
 .../execute/PRPerformanceTestDUnitTest.java     |    8 +-
 .../cache/execute/PRTransactionDUnitTest.java   |   50 +-
 .../execute/SingleHopGetAllPutAllDUnitTest.java |    6 +-
 .../cache/ha/Bug36853EventsExpiryDUnitTest.java |   17 +-
 .../internal/cache/ha/Bug48571DUnitTest.java    |   20 +-
 .../internal/cache/ha/Bug48879DUnitTest.java    |   20 +-
 .../cache/ha/EventIdOptimizationDUnitTest.java  |   44 +-
 .../internal/cache/ha/FailoverDUnitTest.java    |   18 +-
 .../internal/cache/ha/HABugInPutDUnitTest.java  |   20 +-
 .../internal/cache/ha/HAClearDUnitTest.java     |   26 +-
 .../cache/ha/HAConflationDUnitTest.java         |   14 +-
 .../internal/cache/ha/HADuplicateDUnitTest.java |   21 +-
 .../cache/ha/HAEventIdPropagationDUnitTest.java |  107 +-
 .../internal/cache/ha/HAExpiryDUnitTest.java    |   56 +-
 .../internal/cache/ha/HAGIIBugDUnitTest.java    |   12 +-
 .../internal/cache/ha/HAGIIDUnitTest.java       |   29 +-
 .../cache/ha/HARQueueNewImplDUnitTest.java      |  436 ++--
 .../internal/cache/ha/HARegionDUnitTest.java    |   68 +-
 .../cache/ha/HARegionQueueDUnitTest.java        |   83 +-
 .../cache/ha/HASlowReceiverDUnitTest.java       |   25 +-
 .../ha/OperationsPropagationDUnitTest.java      |   30 +-
 .../internal/cache/ha/PutAllDUnitTest.java      |   51 +-
 .../internal/cache/ha/StatsBugDUnitTest.java    |   28 +-
 .../cache/locks/TXLockServiceDUnitTest.java     |   28 +-
 .../cache/partitioned/Bug43684DUnitTest.java    |   36 +-
 .../cache/partitioned/Bug47388DUnitTest.java    |   29 +-
 .../cache/partitioned/Bug51400DUnitTest.java    |   21 +-
 .../PartitionedRegionLoaderWriterDUnitTest.java |   54 +-
 .../fixed/FixedPartitioningDUnitTest.java       | 1139 ++++-----
 .../fixed/FixedPartitioningTestBase.java        |   10 +-
 ...ngWithColocationAndPersistenceDUnitTest.java | 1296 +++++------
 .../internal/cache/tier/Bug40396DUnitTest.java  |   21 +-
 ...mpatibilityHigherVersionClientDUnitTest.java |   29 +-
 .../cache/tier/sockets/Bug36269DUnitTest.java   |   14 +-
 .../cache/tier/sockets/Bug36457DUnitTest.java   |   29 +-
 .../cache/tier/sockets/Bug36805DUnitTest.java   |   32 +-
 .../cache/tier/sockets/Bug36829DUnitTest.java   |   23 +-
 .../cache/tier/sockets/Bug36995DUnitTest.java   |   35 +-
 .../cache/tier/sockets/Bug37210DUnitTest.java   |   19 +-
 .../cache/tier/sockets/Bug37805DUnitTest.java   |   16 +-
 .../CacheServerTransactionsDUnitTest.java       |  218 +-
 .../tier/sockets/ClearPropagationDUnitTest.java |   48 +-
 .../tier/sockets/ClientConflationDUnitTest.java |   28 +-
 .../sockets/ClientInterestNotifyDUnitTest.java  |   85 +-
 .../tier/sockets/ClientServerMiscDUnitTest.java |   35 +-
 .../cache/tier/sockets/ConflationDUnitTest.java |   81 +-
 .../DataSerializerPropogationDUnitTest.java     |  329 ++-
 .../DestroyEntryPropagationDUnitTest.java       |   86 +-
 .../DurableClientQueueSizeDUnitTest.java        |  106 +-
 .../DurableClientReconnectDUnitTest.java        |   40 +-
 .../sockets/DurableClientStatsDUnitTest.java    |   72 +-
 .../sockets/DurableRegistrationDUnitTest.java   |  335 +--
 .../sockets/DurableResponseMatrixDUnitTest.java |   86 +-
 .../sockets/EventIDVerificationDUnitTest.java   |   64 +-
 .../EventIDVerificationInP2PDUnitTest.java      |   38 +-
 .../cache/tier/sockets/HABug36738DUnitTest.java |   18 +-
 .../tier/sockets/HAInterestPart1DUnitTest.java  |  100 +-
 .../tier/sockets/HAInterestPart2DUnitTest.java  |  114 +-
 .../cache/tier/sockets/HAInterestTestCase.java  |   32 +-
 .../sockets/HAStartupAndFailoverDUnitTest.java  |  108 +-
 .../InstantiatorPropagationDUnitTest.java       |  230 +-
 .../tier/sockets/InterestListDUnitTest.java     |  280 +--
 .../sockets/InterestListEndpointDUnitTest.java  |   58 +-
 .../sockets/InterestListFailoverDUnitTest.java  |   46 +-
 .../sockets/InterestListRecoveryDUnitTest.java  |   24 +-
 .../sockets/InterestRegrListenerDUnitTest.java  |   82 +-
 .../sockets/InterestResultPolicyDUnitTest.java  |   27 +-
 .../sockets/NewRegionAttributesDUnitTest.java   |   28 +-
 .../sockets/RedundancyLevelPart1DUnitTest.java  |   36 +-
 .../sockets/RedundancyLevelPart2DUnitTest.java  |   67 +-
 .../sockets/RedundancyLevelPart3DUnitTest.java  |  100 +-
 .../tier/sockets/RedundancyLevelTestBase.java   |   20 +-
 .../tier/sockets/RegionCloseDUnitTest.java      |   16 +-
 ...erInterestBeforeRegionCreationDUnitTest.java |   20 +-
 .../sockets/RegisterInterestKeysDUnitTest.java  |   24 +-
 .../sockets/ReliableMessagingDUnitTest.java     |   22 +-
 .../sockets/UnregisterInterestDUnitTest.java    |   62 +-
 .../sockets/UpdatePropagationDUnitTest.java     |   65 +-
 .../VerifyEventIDGenerationInP2PDUnitTest.java  |   13 +-
 ...UpdatesFromNonInterestEndPointDUnitTest.java |   25 +-
 .../cache/wan/AsyncEventQueueTestBase.java      |   16 +-
 .../asyncqueue/AsyncEventListenerDUnitTest.java | 2175 ++++++++----------
 .../AsyncEventQueueStatsDUnitTest.java          |  321 ++-
 .../ConcurrentAsyncEventQueueDUnitTest.java     |  354 ++-
 .../CommonParallelAsyncEventQueueDUnitTest.java |   15 +-
 .../internal/jta/dunit/ExceptionsDUnitTest.java |   10 +-
 .../jta/dunit/IdleTimeOutDUnitTest.java         |    7 +-
 .../jta/dunit/LoginTimeOutDUnitTest.java        |    8 +-
 .../jta/dunit/MaxPoolSizeDUnitTest.java         |    5 +-
 .../jta/dunit/TransactionTimeOutDUnitTest.java  |   24 +-
 .../dunit/TxnManagerMultiThreadDUnitTest.java   |   14 +-
 .../internal/jta/dunit/TxnTimeOutDUnitTest.java |    9 +-
 .../statistics/StatisticsDUnitTest.java         |   10 +-
 .../management/CacheManagementDUnitTest.java    |   16 +-
 .../management/ClientHealthStatsDUnitTest.java  |   56 +-
 .../gemfire/management/QueryDataDUnitTest.java  |   20 +-
 ...ersalMembershipListenerAdapterDUnitTest.java |   54 +-
 .../cli/commands/FunctionCommandsDUnitTest.java |    4 +-
 .../commands/GemfireDataCommandsDUnitTest.java  |    4 +-
 .../MiscellaneousCommandsDUnitTest.java         |    6 +-
 ...laneousCommandsExportLogsPart3DUnitTest.java |    2 +-
 .../internal/pulse/TestFunctionsDUnitTest.java  |    3 +-
 .../internal/pulse/TestHeapDUnitTest.java       |    5 +-
 .../internal/pulse/TestLocatorsDUnitTest.java   |    3 +-
 .../web/controllers/RestAPITestBase.java        |    8 +-
 .../security/ClientAuthenticationDUnitTest.java |  417 ++--
 .../security/ClientAuthorizationDUnitTest.java  |  235 +-
 .../security/ClientAuthorizationTestBase.java   |   19 +-
 .../security/ClientMultiUserAuthzDUnitTest.java |   53 +-
 .../DeltaClientAuthorizationDUnitTest.java      |   47 +-
 .../DeltaClientPostAuthorizationDUnitTest.java  |   36 +-
 .../security/P2PAuthenticationDUnitTest.java    |  116 +-
 .../gemfire/test/dunit/AsyncInvocation.java     |    4 +-
 .../gemfire/test/dunit/RMIException.java        |    2 +-
 .../test/dunit/tests/BasicDUnitTest.java        |   12 +-
 .../gemfire/test/dunit/tests/VMDUnitTest.java   |   18 +-
 .../cache/query/cq/dunit/CqDataDUnitTest.java   |   33 +-
 .../cq/dunit/CqDataUsingPoolDUnitTest.java      |   91 +-
 .../cache/query/cq/dunit/CqPerfDUnitTest.java   |   19 +-
 .../cq/dunit/CqPerfUsingPoolDUnitTest.java      |   17 +-
 .../cache/query/cq/dunit/CqQueryDUnitTest.java  |   92 +-
 .../dunit/CqQueryOptimizedExecuteDUnitTest.java |   12 +-
 .../cq/dunit/CqQueryUsingPoolDUnitTest.java     |   49 +-
 .../cq/dunit/CqResultSetUsingPoolDUnitTest.java |   34 +-
 ...ltSetUsingPoolOptimizedExecuteDUnitTest.java |    4 +-
 .../cache/query/cq/dunit/CqStatsDUnitTest.java  |    4 +-
 .../cq/dunit/CqStatsUsingPoolDUnitTest.java     |    4 +-
 .../PartitionedRegionCqQueryDUnitTest.java      |   32 +-
 ...dRegionCqQueryOptimizedExecuteDUnitTest.java |    6 +-
 .../query/cq/dunit/PrCqUsingPoolDUnitTest.java  |   28 +-
 .../cache/query/dunit/PdxQueryCQDUnitTest.java  |   14 +-
 .../dunit/QueryIndexUpdateRIDUnitTest.java      |   24 +-
 .../query/dunit/QueryMonitorDUnitTest.java      |    7 +-
 .../cache/PRDeltaPropagationDUnitTest.java      |  192 +-
 .../internal/cache/ha/CQListGIIDUnitTest.java   |  116 +-
 .../cache/ha/HADispatcherDUnitTest.java         |   38 +-
 .../sockets/ClientToServerDeltaDUnitTest.java   |  282 +--
 .../DeltaPropagationWithCQDUnitTest.java        |   41 +-
 ...ToRegionRelationCQRegistrationDUnitTest.java |  140 +-
 .../sockets/DurableClientCrashDUnitTest.java    |    4 +-
 .../sockets/DurableClientNetDownDUnitTest.java  |   10 +-
 .../sockets/DurableClientSimpleDUnitTest.java   |  442 ++--
 .../tier/sockets/DurableClientTestCase.java     |  202 +-
 .../CacheServerManagementDUnitTest.java         |    3 +-
 .../cli/commands/ClientCommandsDUnitTest.java   |    8 +-
 .../DurableClientCommandsDUnitTest.java         |    6 +-
 .../internal/pulse/TestCQDUnitTest.java         |    6 +-
 .../internal/pulse/TestClientsDUnitTest.java    |    6 +-
 .../internal/pulse/TestServerDUnitTest.java     |    3 +-
 .../ClientAuthorizationTwoDUnitTest.java        |   20 +-
 .../security/ClientAuthzObjectModDUnitTest.java |   23 +-
 .../ClientCQPostAuthorizationDUnitTest.java     |   62 +-
 .../ClientPostAuthorizationDUnitTest.java       |   49 +-
 .../gemfire/security/MultiuserAPIDUnitTest.java |   41 +-
 .../MultiuserDurableCQAuthzDUnitTest.java       |   52 +-
 .../internal/cache/UpdateVersionDUnitTest.java  |   88 +-
 .../gemfire/internal/cache/wan/WANTestBase.java |   16 +-
 ...oncurrentParallelGatewaySenderDUnitTest.java | 1164 +++++-----
 ...allelGatewaySenderOperation_1_DUnitTest.java | 1063 +++++----
 ...allelGatewaySenderOperation_2_DUnitTest.java |   63 +-
 .../ConcurrentWANPropogation_1_DUnitTest.java   |  644 +++---
 .../ConcurrentWANPropogation_2_DUnitTest.java   |  699 +++---
 .../cache/wan/disttx/DistTXWANDUnitTest.java    |  258 +--
 .../CommonParallelGatewaySenderDUnitTest.java   |  459 ++--
 ...wWANConcurrencyCheckForDestroyDUnitTest.java |  164 +-
 .../cache/wan/misc/PDXNewWanDUnitTest.java      |  744 +++---
 ...dRegion_ParallelWANPersistenceDUnitTest.java |  767 +++---
 ...dRegion_ParallelWANPropogationDUnitTest.java | 1014 ++++----
 .../SenderWithTransportFilterDUnitTest.java     |   66 +-
 ...downAllPersistentGatewaySenderDUnitTest.java |   48 +-
 .../wan/misc/WANLocatorServerDUnitTest.java     |   40 +-
 .../cache/wan/misc/WANSSLDUnitTest.java         |   98 +-
 .../wan/misc/WanAutoDiscoveryDUnitTest.java     |  282 +--
 .../cache/wan/misc/WanValidationsDUnitTest.java | 1594 ++++++-------
 ...arallelGatewaySenderOperationsDUnitTest.java |  273 ++-
 ...llelGatewaySenderQueueOverflowDUnitTest.java |  476 ++--
 ...ersistenceEnabledGatewaySenderDUnitTest.java | 1839 +++++++--------
 ...llelWANPropagationClientServerDUnitTest.java |   94 +-
 ...lelWANPropagationConcurrentOpsDUnitTest.java |  264 ++-
 .../ParallelWANPropagationDUnitTest.java        | 2046 ++++++++--------
 ...ParallelWANPropagationLoopBackDUnitTest.java |  438 ++--
 .../wan/parallel/ParallelWANStatsDUnitTest.java |  366 ++-
 ...tewaySenderDistributedDeadlockDUnitTest.java |  171 +-
 ...rialGatewaySenderEventListenerDUnitTest.java |  300 ++-
 .../SerialGatewaySenderOperationsDUnitTest.java |   26 +-
 .../SerialGatewaySenderQueueDUnitTest.java      |  200 +-
 ...ersistenceEnabledGatewaySenderDUnitTest.java |  707 +++---
 .../SerialWANPropagationLoopBackDUnitTest.java  |  547 ++---
 .../serial/SerialWANPropogationDUnitTest.java   | 1701 +++++++-------
 ...NPropogation_PartitionedRegionDUnitTest.java |  693 +++---
 .../SerialWANPropogationsFeatureDUnitTest.java  |  562 +++--
 .../wan/serial/SerialWANStatsDUnitTest.java     |  733 +++---
 .../wan/wancommand/WANCommandTestBase.java      |   16 +-
 ...anCommandCreateGatewayReceiverDUnitTest.java |  274 +--
 .../WanCommandCreateGatewaySenderDUnitTest.java |  302 +--
 ...WanCommandGatewayReceiverStartDUnitTest.java |  171 +-
 .../WanCommandGatewayReceiverStopDUnitTest.java |  175 +-
 .../WanCommandGatewaySenderStartDUnitTest.java  |  289 ++-
 .../WanCommandGatewaySenderStopDUnitTest.java   |  273 ++-
 .../wan/wancommand/WanCommandListDUnitTest.java |  172 +-
 .../WanCommandPauseResumeDUnitTest.java         |  630 +++--
 .../wancommand/WanCommandStatusDUnitTest.java   |  234 +-
 .../management/WANManagementDUnitTest.java      |  108 +-
 .../pulse/TestRemoteClusterDUnitTest.java       |   46 +-
 296 files changed, 18455 insertions(+), 23442 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/CacheRegionClearStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/CacheRegionClearStatsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/CacheRegionClearStatsDUnitTest.java
index 7ea3565..743887a 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/CacheRegionClearStatsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/CacheRegionClearStatsDUnitTest.java
@@ -148,13 +148,11 @@ public class CacheRegionClearStatsDUnitTest extends DistributedTestCase {
    * 1)Verifies that clear operation count matches with stats count<br>
    */
   public void testClearStatsWithNormalRegion(){
-    Integer port1 = ((Integer)server1.invoke(
-        CacheRegionClearStatsDUnitTest.class, "createServerCache"));
+    Integer port1 = ((Integer)server1.invoke(() -> CacheRegionClearStatsDUnitTest.createServerCache()));
 
-    client1.invoke(CacheRegionClearStatsDUnitTest.class,
-        "createClientCache", new Object[] {
-            NetworkUtils.getServerHostName(server1.getHost()), port1 });
-    client1.invoke(CacheRegionClearStatsDUnitTest.class, "put");
+    client1.invoke(() -> CacheRegionClearStatsDUnitTest.createClientCache(
+            NetworkUtils.getServerHostName(server1.getHost()), port1 ));
+    client1.invoke(() -> CacheRegionClearStatsDUnitTest.put());
     
     try{
       Thread.sleep(10000);
@@ -162,24 +160,20 @@ public class CacheRegionClearStatsDUnitTest extends DistributedTestCase {
       // sleep 
     }
     
-    client1.invoke(CacheRegionClearStatsDUnitTest.class,
-        "validationClearStat");
+    client1.invoke(() -> CacheRegionClearStatsDUnitTest.validationClearStat());
     
-    server1.invoke(CacheRegionClearStatsDUnitTest.class,
-    "validationClearStat");
+    server1.invoke(() -> CacheRegionClearStatsDUnitTest.validationClearStat());
   }
   /**
    * This test does the following (<b> clear stats counter when disk involved </b>):<br>
    * 1)Verifies that clear operation count matches with stats count <br>
    */
   public void testClearStatsWithDiskRegion(){
-    Integer port1 = ((Integer)server1.invoke(
-        CacheRegionClearStatsDUnitTest.class, "createServerCacheDisk"));
+    Integer port1 = ((Integer)server1.invoke(() -> CacheRegionClearStatsDUnitTest.createServerCacheDisk()));
 
-    client1.invoke(CacheRegionClearStatsDUnitTest.class,
-        "createClientCacheDisk", new Object[] {
-            NetworkUtils.getServerHostName(server1.getHost()), port1 });
-    client1.invoke(CacheRegionClearStatsDUnitTest.class, "put");
+    client1.invoke(() -> CacheRegionClearStatsDUnitTest.createClientCacheDisk(
+            NetworkUtils.getServerHostName(server1.getHost()), port1 ));
+    client1.invoke(() -> CacheRegionClearStatsDUnitTest.put());
     
     try{
       Thread.sleep(10000);
@@ -187,18 +181,16 @@ public class CacheRegionClearStatsDUnitTest extends DistributedTestCase {
       // sleep 
     }
     
-    client1.invoke(CacheRegionClearStatsDUnitTest.class,
-        "validationClearStat");
+    client1.invoke(() -> CacheRegionClearStatsDUnitTest.validationClearStat());
     
-    server1.invoke(CacheRegionClearStatsDUnitTest.class,
-    "validationClearStat");
+    server1.invoke(() -> CacheRegionClearStatsDUnitTest.validationClearStat());
   }
   
   @Override
   protected final void preTearDown() throws Exception {
-    client1.invoke(CacheRegionClearStatsDUnitTest.class, "closeCache");
+    client1.invoke(() -> CacheRegionClearStatsDUnitTest.closeCache());
     // then close the servers
-    server1.invoke(CacheRegionClearStatsDUnitTest.class, "closeCache");
+    server1.invoke(() -> CacheRegionClearStatsDUnitTest.closeCache());
   }
 
   public static void closeCache() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/ClientServerTimeSyncDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/ClientServerTimeSyncDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/ClientServerTimeSyncDUnitTest.java
index 8166318..8b04ab5 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/ClientServerTimeSyncDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/ClientServerTimeSyncDUnitTest.java
@@ -113,7 +113,7 @@ public class ClientServerTimeSyncDUnitTest extends CacheTestCase {
       Wait.waitForCriterion(wc, 60000, 1000, true);
     } finally {
       cache.close();
-      vm1.invoke(CacheTestCase.class, "disconnectFromDS");
+      vm1.invoke(() -> CacheTestCase.disconnectFromDS());
     }
   }
   
@@ -196,7 +196,7 @@ public class ClientServerTimeSyncDUnitTest extends CacheTestCase {
       Wait.waitForCriterion(wc, 60000, 1000, true);
     } finally {
       cache.close();
-      vm1.invoke(CacheTestCase.class, "disconnectFromDS");
+      vm1.invoke(() -> CacheTestCase.disconnectFromDS());
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
index 9bdf56c..5fa4fc4 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
@@ -252,10 +252,10 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     boolean cacheClientSslenabled = true;
     boolean cacheClientSslRequireAuth = true;
     
-    serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "setUpServerVMTask", new Object[]{cacheServerSslenabled});
-    serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "createServerTask");
+    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.setUpServerVMTask(cacheServerSslenabled));
+    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.createServerTask());
     
-    Object array[] = (Object[])serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "getCacheServerEndPointTask"); 
+    Object array[] = (Object[])serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.getCacheServerEndPointTask()); 
     String hostName = (String)array[0];
     int port = (Integer) array[1];
     Object params[] = new Object[6];
@@ -267,8 +267,8 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     params[5] = CLIENT_TRUST_STORE;
     //getLogWriter().info("Starting client with server endpoint " + hostName + ":" + port);
     clientVM.invoke(CacheServerSSLConnectionDUnitTest.class, "setUpClientVMTask", params);
-    clientVM.invoke(CacheServerSSLConnectionDUnitTest.class, "doClientRegionTestTask");
-    serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "doServerRegionTestTask");
+    clientVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doClientRegionTestTask());
+    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doServerRegionTestTask());
     
   }
   
@@ -282,10 +282,10 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     boolean cacheClientSslenabled = false;
     boolean cacheClientSslRequireAuth = true;
     
-    serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "setUpServerVMTask", new Object[]{cacheServerSslenabled});
-    serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "createServerTask");
+    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.setUpServerVMTask(cacheServerSslenabled));
+    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.createServerTask());
     
-    Object array[] = (Object[])serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "getCacheServerEndPointTask"); 
+    Object array[] = (Object[])serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.getCacheServerEndPointTask()); 
     String hostName = (String)array[0];
     int port = (Integer) array[1];
     Object params[] = new Object[6];
@@ -300,8 +300,8 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     try{
       //getLogWriter().info("Starting client with server endpoint " + hostName + ":" + port);    
       clientVM.invoke(CacheServerSSLConnectionDUnitTest.class, "setUpClientVMTaskNoSubscription", params);
-      clientVM.invoke(CacheServerSSLConnectionDUnitTest.class, "doClientRegionTestTask");
-      serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "doServerRegionTestTask");
+      clientVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doClientRegionTestTask());
+      serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doServerRegionTestTask());
       fail("Test should fail as non-ssl client is trying to connect to ssl configured server");
     } catch (Exception rmiException) {
       Throwable e = rmiException.getCause();
@@ -330,10 +330,10 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     boolean cacheClientSslenabled = true;
     boolean cacheClientSslRequireAuth = false;
 
-    serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "setUpServerVMTask", new Object[]{cacheServerSslenabled});
-    serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "createServerTask");
+    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.setUpServerVMTask(cacheServerSslenabled));
+    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.createServerTask());
 
-    Object array[] = (Object[])serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "getCacheServerEndPointTask"); 
+    Object array[] = (Object[])serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.getCacheServerEndPointTask()); 
     String hostName = (String)array[0];
     int port = (Integer) array[1];
     Object params[] = new Object[6];
@@ -346,8 +346,8 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     //getLogWriter().info("Starting client with server endpoint " + hostName + ":" + port);
     try {
       clientVM.invoke(CacheServerSSLConnectionDUnitTest.class, "setUpClientVMTask", params);
-      clientVM.invoke(CacheServerSSLConnectionDUnitTest.class, "doClientRegionTestTask");
-      serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "doServerRegionTestTask");
+      clientVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doClientRegionTestTask());
+      serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doServerRegionTestTask());
     } catch (Exception rmiException) {
       Throwable e = rmiException.getCause();
       //getLogWriter().info("ExceptionCause at clientVM " + e);
@@ -372,10 +372,10 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     boolean cacheClientSslenabled = true;
     boolean cacheClientSslRequireAuth = true;
     
-    serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "setUpServerVMTask", new Object[]{cacheServerSslenabled});
-    serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "createServerTask");
+    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.setUpServerVMTask(cacheServerSslenabled));
+    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.createServerTask());
     
-    Object array[] = (Object[])serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "getCacheServerEndPointTask"); 
+    Object array[] = (Object[])serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.getCacheServerEndPointTask()); 
     String hostName = (String)array[0];
     int port = (Integer) array[1];
     Object params[] = new Object[6];
@@ -389,8 +389,8 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     try{
       //getLogWriter().info("Starting client with server endpoint " + hostName + ":" + port);    
       clientVM.invoke(CacheServerSSLConnectionDUnitTest.class, "setUpClientVMTask", params);
-      clientVM.invoke(CacheServerSSLConnectionDUnitTest.class, "doClientRegionTestTask");
-      serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "doServerRegionTestTask");
+      clientVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doClientRegionTestTask());
+      serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doServerRegionTestTask());
       fail("Test should fail as ssl client with ssl enabled is trying to connect to server with ssl disabled");
     }catch (Exception rmiException) {
       
@@ -417,8 +417,8 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     final Host host = Host.getHost(0);
     VM serverVM = host.getVM(1);
     VM clientVM = host.getVM(2);
-    clientVM.invoke(CacheServerSSLConnectionDUnitTest.class, "closeClientCacheTask");
-    serverVM.invoke(CacheServerSSLConnectionDUnitTest.class, "closeCacheTask");
+    clientVM.invoke(() -> CacheServerSSLConnectionDUnitTest.closeClientCacheTask());
+    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.closeCacheTask());
   }
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java
index bb1cc09..e23fb76 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java
@@ -241,10 +241,10 @@ public class SSLNoClientAuthDUnitTest extends DistributedTestCase {
     boolean cacheClientSslenabled = true;
     boolean cacheClientSslRequireAuth = true;
 
-    serverVM.invoke(SSLNoClientAuthDUnitTest.class, "setUpServerVMTask", new Object[]{cacheServerSslenabled});
-    serverVM.invoke(SSLNoClientAuthDUnitTest.class, "createServerTask");
+    serverVM.invoke(() -> SSLNoClientAuthDUnitTest.setUpServerVMTask(cacheServerSslenabled));
+    serverVM.invoke(() -> SSLNoClientAuthDUnitTest.createServerTask());
 
-    Object array[] = (Object[])serverVM.invoke(SSLNoClientAuthDUnitTest.class, "getCacheServerEndPointTask"); 
+    Object array[] = (Object[])serverVM.invoke(() -> SSLNoClientAuthDUnitTest.getCacheServerEndPointTask()); 
     String hostName = (String)array[0];
     int port = (Integer) array[1];
     Object params[] = new Object[6];
@@ -257,8 +257,8 @@ public class SSLNoClientAuthDUnitTest extends DistributedTestCase {
     //getLogWriter().info("Starting client with server endpoint " + hostName + ":" + port);
     try {
       clientVM.invoke(SSLNoClientAuthDUnitTest.class, "setUpClientVMTask", params);
-      clientVM.invoke(SSLNoClientAuthDUnitTest.class, "doClientRegionTestTask");
-      serverVM.invoke(SSLNoClientAuthDUnitTest.class, "doServerRegionTestTask");
+      clientVM.invoke(() -> SSLNoClientAuthDUnitTest.doClientRegionTestTask());
+      serverVM.invoke(() -> SSLNoClientAuthDUnitTest.doServerRegionTestTask());
     } catch (Exception rmiException) {
       Throwable e = rmiException.getCause();
       //getLogWriter().info("ExceptionCause at clientVM " + e);
@@ -271,7 +271,7 @@ public class SSLNoClientAuthDUnitTest extends DistributedTestCase {
     final Host host = Host.getHost(0);
     VM serverVM = host.getVM(1);
     VM clientVM = host.getVM(2);
-    clientVM.invoke(SSLNoClientAuthDUnitTest.class, "closeClientCacheTask");
-    serverVM.invoke(SSLNoClientAuthDUnitTest.class, "closeCacheTask");
+    clientVM.invoke(() -> SSLNoClientAuthDUnitTest.closeClientCacheTask());
+    serverVM.invoke(() -> SSLNoClientAuthDUnitTest.closeCacheTask());
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/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 4e4b10f..c93848b 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
@@ -1732,7 +1732,7 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase {
     final float criticalHeapThresh = 0.90f;
     final int fakeHeapMaxSize = 1000;
 
-    vm.invoke(DistributedTestCase.class, "disconnectFromDS");
+    vm.invoke(() -> DistributedTestCase.disconnectFromDS());
     
     vm.invoke(new CacheSerializableRunnable("test LocalRegion load passthrough when critical") {
       @Override
@@ -1850,8 +1850,8 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase {
     final int fakeHeapMaxSize = 1000;
 
     // Make sure the desired VMs will have a fresh DS.
-    AsyncInvocation d1 = replicate1.invokeAsync(DistributedTestCase.class, "disconnectFromDS");
-    AsyncInvocation d2 = replicate2.invokeAsync(DistributedTestCase.class, "disconnectFromDS");
+    AsyncInvocation d1 = replicate1.invokeAsync(() -> DistributedTestCase.disconnectFromDS());
+    AsyncInvocation d2 = replicate2.invokeAsync(() -> DistributedTestCase.disconnectFromDS());
     d1.join();
     assertFalse(d1.exceptionOccurred());
     d2.join();
@@ -2032,8 +2032,8 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase {
     final int fakeHeapMaxSize = 1000;
 
     // Make sure the desired VMs will have a fresh DS.
-    AsyncInvocation d0 = accessor.invokeAsync(DistributedTestCase.class, "disconnectFromDS");
-    AsyncInvocation d1 = ds1.invokeAsync(DistributedTestCase.class, "disconnectFromDS");
+    AsyncInvocation d0 = accessor.invokeAsync(() -> DistributedTestCase.disconnectFromDS());
+    AsyncInvocation d1 = ds1.invokeAsync(() -> DistributedTestCase.disconnectFromDS());
     d0.join();
     assertFalse(d0.exceptionOccurred());
     d1.join();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
index 532a239..3cf7b09 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
@@ -524,8 +524,8 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     final String rName = getUniqueName();
     
     // Make sure the desired VMs will have a fresh DS.
-    AsyncInvocation d1 = replicate1.invokeAsync(DistributedTestCase.class, "disconnectFromDS");
-    AsyncInvocation d2 = replicate2.invokeAsync(DistributedTestCase.class, "disconnectFromDS");
+    AsyncInvocation d1 = replicate1.invokeAsync(() -> DistributedTestCase.disconnectFromDS());
+    AsyncInvocation d2 = replicate2.invokeAsync(() -> DistributedTestCase.disconnectFromDS());
     d1.join();
     assertFalse(d1.exceptionOccurred());
     d2.join();
@@ -928,8 +928,8 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     final String rName = getUniqueName();
 
     // Make sure the desired VMs will have a fresh DS.
-    AsyncInvocation d0 = accessor.invokeAsync(DistributedTestCase.class, "disconnectFromDS");
-    AsyncInvocation d1 = ds1.invokeAsync(DistributedTestCase.class, "disconnectFromDS");
+    AsyncInvocation d0 = accessor.invokeAsync(() -> DistributedTestCase.disconnectFromDS());
+    AsyncInvocation d1 = ds1.invokeAsync(() -> DistributedTestCase.disconnectFromDS());
     d0.join();
     assertFalse(d0.exceptionOccurred());
     d1.join();
@@ -1152,7 +1152,7 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     final VM vm = host.getVM(2);
     final String rName = getUniqueName();
 
-    vm.invoke(DistributedTestCase.class, "disconnectFromDS");
+    vm.invoke(() -> DistributedTestCase.disconnectFromDS());
     
     vm.invoke(new CacheSerializableRunnable("test LocalRegion load passthrough when critical") {
       @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java
index 42459c9..934798c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxStringQueryDUnitTest.java
@@ -166,9 +166,9 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     });
 
     // Client pool.
-    final int port0 = server0.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final int port1 = server1.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final int port2 = server2.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
+    final int port0 = server0.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
+    final int port1 = server1.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
+    final int port2 = server2.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
 
     final String host0 = NetworkUtils.getServerHostName(server0.getHost());
 
@@ -424,9 +424,9 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     });
 
     // Client pool.
-    final int port0 = server0.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final int port1 = server1.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final int port2 = server2.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
+    final int port0 = server0.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
+    final int port1 = server1.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
+    final int port2 = server2.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
 
     final String host0 = NetworkUtils.getServerHostName(server0.getHost());
 
@@ -637,9 +637,9 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     });
 
     // Client pool.
-    final int port0 = server0.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final int port1 = server1.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final int port2 = server2.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
+    final int port0 = server0.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
+    final int port1 = server1.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
+    final int port2 = server2.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(server0.getHost());
 
     // Create client pool.
@@ -850,9 +850,9 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     });
 
     // Client pool.
-    final int port0 = server0.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final int port1 = server1.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final int port2 = server2.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
+    final int port0 = server0.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
+    final int port1 = server1.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
+    final int port2 = server2.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
 
     final String host0 = NetworkUtils.getServerHostName(server0.getHost());
 
@@ -1114,9 +1114,9 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     });
 
     // Client pool.
-    final int port0 = server0.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final int port1 = server1.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final int port2 = server2.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
+    final int port0 = server0.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
+    final int port1 = server1.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
+    final int port2 = server2.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
 
     final String host0 = NetworkUtils.getServerHostName(server0.getHost());
 
@@ -1341,9 +1341,9 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     });
 
     // Client pool.
-    final int port0 = server0.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final int port1 = server1.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final int port2 = server2.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
+    final int port0 = server0.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
+    final int port1 = server1.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
+    final int port2 = server2.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
 
     final String host0 = NetworkUtils.getServerHostName(server0.getHost());
 
@@ -1568,9 +1568,9 @@ public class PdxStringQueryDUnitTest extends CacheTestCase{
     });
 
     // Client pool.
-    final int port0 = server0.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final int port1 = server1.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
-    final int port2 = server2.invokeInt(PdxStringQueryDUnitTest.class, "getCacheServerPort");
+    final int port0 = server0.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
+    final int port1 = server1.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
+    final int port2 = server2.invoke(() -> PdxStringQueryDUnitTest.getCacheServerPort());
 
     final String host0 = NetworkUtils.getServerHostName(server0.getHost());
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java
index aeb4343..0227836 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java
@@ -114,8 +114,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
   public void testCompactRangeIndex() {
     // Create caches
     Properties props = new Properties();
-    server.invoke(PRClientServerTestBase.class, "createCacheInVm",
-        new Object[] { props });
+    server.invoke(() -> PRClientServerTestBase.createCacheInVm( props ));
 
     server.invoke(new CacheSerializableRunnable("create indexes") {
 
@@ -210,8 +209,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
   public void testRangeIndex() {
     // Create caches
     Properties props = new Properties();
-    server.invoke(PRClientServerTestBase.class, "createCacheInVm",
-        new Object[] { props });
+    server.invoke(() -> PRClientServerTestBase.createCacheInVm( props ));
 
     server.invoke(new CacheSerializableRunnable("create indexes") {
 
@@ -305,8 +303,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
   public void testRangeIndexWithIndexAndQueryFromCluaseMisMatch() {
     // Create caches
     Properties props = new Properties();
-    server.invoke(PRClientServerTestBase.class, "createCacheInVm",
-        new Object[] { props });
+    server.invoke(() -> PRClientServerTestBase.createCacheInVm( props ));
 
     server.invoke(new CacheSerializableRunnable("create indexes") {
 
@@ -396,8 +393,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
   public void testRangeIndexWithIndexAndQueryFromCluaseMisMatch2() {
     // Create caches
     Properties props = new Properties();
-    server.invoke(PRClientServerTestBase.class, "createCacheInVm",
-        new Object[] { props });
+    server.invoke(() -> PRClientServerTestBase.createCacheInVm( props ));
 
     server.invoke(new CacheSerializableRunnable("create indexes") {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingFunctionContextDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingFunctionContextDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingFunctionContextDUnitTest.java
index fcc96dc..2d7212e 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingFunctionContextDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingFunctionContextDUnitTest.java
@@ -713,44 +713,37 @@ public class QueryUsingFunctionContextDUnitTest extends CacheTestCase {
   private void createServersWithRegions() {
     //Create caches
     Properties props = new Properties();
-    server1.invoke(PRClientServerTestBase.class, "createCacheInVm",
-        new Object[] { props });
-    server2.invoke(PRClientServerTestBase.class, "createCacheInVm",
-        new Object[] { props });
-    server3.invoke(PRClientServerTestBase.class, "createCacheInVm",
-        new Object[] { props });
+    server1.invoke(() -> PRClientServerTestBase.createCacheInVm( props ));
+    server2.invoke(() -> PRClientServerTestBase.createCacheInVm( props ));
+    server3.invoke(() -> PRClientServerTestBase.createCacheInVm( props ));
 
     //Create Cache Servers
-    Integer port1 = (Integer)server1.invoke(PRClientServerTestBase.class,
-    "createCacheServer");
-    Integer port2 = (Integer)server2.invoke(PRClientServerTestBase.class,
-        "createCacheServer");
-    Integer port3 = (Integer)server3.invoke(PRClientServerTestBase.class,
-        "createCacheServer");
+    Integer port1 = (Integer)server1.invoke(() -> PRClientServerTestBase.createCacheServer());
+    Integer port2 = (Integer)server2.invoke(() -> PRClientServerTestBase.createCacheServer());
+    Integer port3 = (Integer)server3.invoke(() -> PRClientServerTestBase.createCacheServer());
     serverPort1 = port1;
     serverPort2 = port2;
     serverPort3 = port3;
 
     //Create client cache without regions
-    client.invoke(QueryUsingFunctionContextDUnitTest.class, "createCacheClientWithoutRegion",
-        new Object[] { NetworkUtils.getServerHostName(server1.getHost()), port1, port2,
-            port3 });
+    client.invoke(() -> QueryUsingFunctionContextDUnitTest.createCacheClientWithoutRegion( NetworkUtils.getServerHostName(server1.getHost()), port1, port2,
+            port3 ));
 
     //Create proxy regions on client.
-    client.invoke(QueryUsingFunctionContextDUnitTest.class, "createProxyRegions");
+    client.invoke(() -> QueryUsingFunctionContextDUnitTest.createProxyRegions());
 
     //Create local Region on servers
-    server1.invoke(QueryUsingFunctionContextDUnitTest.class, "createLocalRegion");
+    server1.invoke(() -> QueryUsingFunctionContextDUnitTest.createLocalRegion());
 
     //Create ReplicatedRegion on servers
-    server1.invoke(QueryUsingFunctionContextDUnitTest.class, "createReplicatedRegion");
-    server2.invoke(QueryUsingFunctionContextDUnitTest.class, "createReplicatedRegion");
-    server3.invoke(QueryUsingFunctionContextDUnitTest.class, "createReplicatedRegion");
+    server1.invoke(() -> QueryUsingFunctionContextDUnitTest.createReplicatedRegion());
+    server2.invoke(() -> QueryUsingFunctionContextDUnitTest.createReplicatedRegion());
+    server3.invoke(() -> QueryUsingFunctionContextDUnitTest.createReplicatedRegion());
 
     //Create two colocated PartitionedRegions On Servers.
-    server1.invoke(QueryUsingFunctionContextDUnitTest.class, "createColocatedPR");
-    server2.invoke(QueryUsingFunctionContextDUnitTest.class, "createColocatedPR");
-    server3.invoke(QueryUsingFunctionContextDUnitTest.class, "createColocatedPR");
+    server1.invoke(() -> QueryUsingFunctionContextDUnitTest.createColocatedPR());
+    server2.invoke(() -> QueryUsingFunctionContextDUnitTest.createColocatedPR());
+    server3.invoke(() -> QueryUsingFunctionContextDUnitTest.createColocatedPR());
 
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
index d1e42d3..4df1f81 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
@@ -195,7 +195,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     });
 
 
-    final int port = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
     final String regionName = "/" + rootRegionName + "/" + name;
 
@@ -331,7 +331,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
       }
     });
 
-    final int port = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
     final String regionName = "/" + rootRegionName + "/" + name;
@@ -571,7 +571,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     });
 
     // Create client region
-    final int port = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
     vm1.invoke(new CacheSerializableRunnable("Create region") {
       public void run2() throws CacheException {
@@ -660,7 +660,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     });
 
     // Create client region
-    final int port = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
     final String regionName = "/" + rootRegionName + "/" + name;
@@ -841,7 +841,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     });
 
     // Create client region
-    final int port = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
     final String regionName = "/" + this.rootRegionName + "/" + this.regionName;
@@ -998,8 +998,8 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     });
 
     // Create client region
-    final int port0 = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
-    final int port1 = vm1.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port0 = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
+    final int port1 = vm1.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
 
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
@@ -1151,7 +1151,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
       }
     });
 
-    final int port = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
     final String regionName = "/" + this.rootRegionName + "/" + this.regionName;
@@ -1242,7 +1242,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
       }
     });
 
-    final int port = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
     final String regionName = "/" + this.rootRegionName + "/" + this.regionName;
@@ -1362,7 +1362,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
       }
     });
 
-    final int port = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
     final String regionName = "/" + this.rootRegionName + "/" + this.regionName;
@@ -1507,7 +1507,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     });
 
     // Create client region
-    final int port0 = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port0 = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
 
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
@@ -1695,7 +1695,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     });
 
     // Create client region
-    final int port = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
     final String regionName1 = "/" + rootRegionName + "/" + name+"1";
     final String regionName2 = "/" + rootRegionName + "/" + name+"2";
@@ -1792,7 +1792,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
       }
     });
 
-    final int port = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
     final String regionName = "/" + rootRegionName + "/" + name;
@@ -1940,7 +1940,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
       }
     });
 
-    final int port = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
     final String regionName1 = "/" + rootRegionName + "/" + name;
@@ -2035,7 +2035,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
     });
 
     // Create client region
-    final int port = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
     final String regionName = "/" + rootRegionName + "/" + name;
@@ -2186,7 +2186,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
       }
     });
 
-    final int port = vm0.invokeInt(QueryUsingPoolDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> QueryUsingPoolDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
     final String regionName1 = "/" + rootRegionName + "/" + name;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
index fc79893..09fd945 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
@@ -123,7 +123,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
       });
 
     // Create client region
-    final int port = vm0.invokeInt(RemoteQueryDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> RemoteQueryDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
     vm1.invoke(new CacheSerializableRunnable("Create region") {
         public void run2() throws CacheException {
@@ -266,7 +266,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
       });
 
     // Create client region
-    final int port = vm0.invokeInt(RemoteQueryDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> RemoteQueryDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
     vm1.invoke(new CacheSerializableRunnable("Create region") {
         public void run2() throws CacheException {
@@ -394,7 +394,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
       });
 
     // Create client region
-    final int port = vm0.invokeInt(RemoteQueryDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> RemoteQueryDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
     vm1.invoke(new CacheSerializableRunnable("Create region") {
         public void run2() throws CacheException {
@@ -627,7 +627,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
       });
 
     // Create client region
-    final int port = vm0.invokeInt(RemoteQueryDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> RemoteQueryDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
     vm1.invoke(new CacheSerializableRunnable("Create region") {
         public void run2() throws CacheException {
@@ -714,7 +714,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
       });
 
     // Create client region
-    final int port = vm0.invokeInt(RemoteQueryDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> RemoteQueryDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
     vm1.invoke(new CacheSerializableRunnable("Create region") {
         public void run2() throws CacheException {
@@ -884,7 +884,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
       });
 
     // Create client region
-    final int port = vm0.invokeInt(RemoteQueryDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> RemoteQueryDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
     vm1.invoke(new CacheSerializableRunnable("Create region") {
         public void run2() throws CacheException {
@@ -978,7 +978,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
         }
       });
 
-    final int port = vm0.invokeInt(RemoteQueryDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> RemoteQueryDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
     // Create client region in VM1
@@ -1137,7 +1137,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
          }
        });
 
-     final int port = vm0.invokeInt(RemoteQueryDUnitTest.class, "getCacheServerPort");
+     final int port = vm0.invoke(() -> RemoteQueryDUnitTest.getCacheServerPort());
      final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
      // Create client region in VM1
@@ -1248,7 +1248,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
           }
         });
 
-      final int port = vm0.invokeInt(RemoteQueryDUnitTest.class, "getCacheServerPort");
+      final int port = vm0.invoke(() -> RemoteQueryDUnitTest.getCacheServerPort());
       final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
       // Create client region in VM1

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java
index 5528299..ca90f00 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java
@@ -254,8 +254,7 @@ public class ConcurrentIndexInitOnOverflowRegionDUnitTest extends CacheTestCase
     });
 
     
-    final int port = vm0.invokeInt(ConcurrentIndexInitOnOverflowRegionDUnitTest.class,
-    "getCacheServerPort");
+    final int port = vm0.invoke(() -> ConcurrentIndexInitOnOverflowRegionDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
 
     // Start changing the value in Region which should turn into a deadlock if

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
index fd50e63..960bd4e 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
@@ -104,7 +104,7 @@ public class PutAllWithIndexPerfDUnitTest extends CacheTestCase {
       });
 
     // Create client region
-    final int port = vm0.invokeInt(PutAllWithIndexPerfDUnitTest.class, "getCacheServerPort");
+    final int port = vm0.invoke(() -> PutAllWithIndexPerfDUnitTest.getCacheServerPort());
     final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
     vm1.invoke(new CacheSerializableRunnable("Create region") {
         public void run2() throws CacheException {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/Bug34387DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/Bug34387DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/Bug34387DUnitTest.java
index 9c35b1b..879600d 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/Bug34387DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/Bug34387DUnitTest.java
@@ -74,7 +74,7 @@ public class Bug34387DUnitTest extends CacheTestCase {
           getCache();
         }
       });
-    vm.invoke(Bug34387DUnitTest.class, "getVMDistributedMember");
+    vm.invoke(() -> Bug34387DUnitTest.getVMDistributedMember());
   }
   private void doCommitOtherVm(final boolean doDestroy) {
     VM vm = getOtherVm();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
index b889bc7..f7e1739 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
@@ -62,8 +62,8 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
       Host host = Host.getHost(0);
       VM vm0 = host.getVM(0);
       VM vm1 = host.getVM(1);
-      vm0.invoke(CacheMapTxnDUnitTest.class, "createCache");
-      vm1.invoke(CacheMapTxnDUnitTest.class, "createCache");
+      vm0.invoke(() -> CacheMapTxnDUnitTest.createCache());
+      vm1.invoke(() -> CacheMapTxnDUnitTest.createCache());
     }
     
     @Override
@@ -71,8 +71,8 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
       Host host = Host.getHost(0);
       VM vm0 = host.getVM(0);
       VM vm1 = host.getVM(1);
-      vm0.invoke(CacheMapTxnDUnitTest.class, "closeCache");
-      vm1.invoke(CacheMapTxnDUnitTest.class, "closeCache");
+      vm0.invoke(() -> CacheMapTxnDUnitTest.closeCache());
+      vm1.invoke(() -> CacheMapTxnDUnitTest.closeCache());
     }
     
     public static void createCache(){
@@ -105,14 +105,14 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
         //this is to test single VM region transactions
         Host host = Host.getHost(0);
         VM vm0 = host.getVM(0);
-        vm0.invoke(CacheMapTxnDUnitTest.class, "commitTxn");
+        vm0.invoke(() -> CacheMapTxnDUnitTest.commitTxn());
     }//end of testCommitTxn
     
     public void testRollbackTxn() {
         //this is to test single VM region transactions
         Host host = Host.getHost(0);
         VM vm0 = host.getVM(0);
-        vm0.invoke(CacheMapTxnDUnitTest.class, "rollbackTxn");
+        vm0.invoke(() -> CacheMapTxnDUnitTest.rollbackTxn());
     }//end of testRollbackTxn
     
     public void testRollbackTxnClear() {
@@ -129,7 +129,7 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
             vm1.invoke(CacheMapTxnDUnitTest.class, "putMethod", objArr);
         }
         
-        vm0.invoke(CacheMapTxnDUnitTest.class, "rollbackTxnClear");
+        vm0.invoke(() -> CacheMapTxnDUnitTest.rollbackTxnClear());
         
         i=3;
         objArr [0] = ""+i;
@@ -144,9 +144,9 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
         Host host = Host.getHost(0);
         VM vm0 = host.getVM(0);
         VM vm1 = host.getVM(1);
-        vm0.invoke(CacheMapTxnDUnitTest.class, "miscMethodsOwner");
-        AsyncInvocation o2 = vm0.invokeAsync(CacheMapTxnDUnitTest.class, "miscMethodsNotOwner");//invoke in same vm but in seperate thread
-        AsyncInvocation o3 = vm1.invokeAsync(CacheMapTxnDUnitTest.class, "miscMethodsNotOwner");//invoke in another vm
+        vm0.invoke(() -> CacheMapTxnDUnitTest.miscMethodsOwner());
+        AsyncInvocation o2 = vm0.invokeAsync(() -> CacheMapTxnDUnitTest.miscMethodsNotOwner());//invoke in same vm but in seperate thread
+        AsyncInvocation o3 = vm1.invokeAsync(() -> CacheMapTxnDUnitTest.miscMethodsNotOwner());//invoke in another vm
         ThreadUtils.join(o2, 30 * 1000);
         ThreadUtils.join(o3, 30 * 1000);
         

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CachedAllEventsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CachedAllEventsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CachedAllEventsDUnitTest.java
index c0a1fc4..c3f97f7 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CachedAllEventsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CachedAllEventsDUnitTest.java
@@ -57,7 +57,7 @@ public class CachedAllEventsDUnitTest extends CacheTestCase {
           getCache();
         }
       });
-    vm.invoke(CachedAllEventsDUnitTest.class, "getVMDistributedMember");
+    vm.invoke(() -> CachedAllEventsDUnitTest.getVMDistributedMember());
   }
   private void doCreateOtherVm() {
     VM vm = getOtherVm();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CallbackArgDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CallbackArgDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CallbackArgDUnitTest.java
index 49e38c0..f0bae93 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CallbackArgDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CallbackArgDUnitTest.java
@@ -68,7 +68,7 @@ public class CallbackArgDUnitTest extends CacheTestCase {
           getCache();
         }
       });
-    vm.invoke(CallbackArgDUnitTest.class, "getVMDistributedMember");
+    vm.invoke(() -> CallbackArgDUnitTest.getVMDistributedMember());
   }
   private void doCommitOtherVm() {
     VM vm = getOtherVm();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java
index 1d5b621..e748a42 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java
@@ -67,8 +67,8 @@ public class ClearMultiVmCallBkDUnitTest extends DistributedTestCase{
       Host host = Host.getHost(0);
       VM vm0 = host.getVM(0);
       VM vm1 = host.getVM(1);
-      vm0.invoke(ClearMultiVmCallBkDUnitTest.class, "createCache");
-      vm1.invoke(ClearMultiVmCallBkDUnitTest.class, "createCache");
+      vm0.invoke(() -> ClearMultiVmCallBkDUnitTest.createCache());
+      vm1.invoke(() -> ClearMultiVmCallBkDUnitTest.createCache());
       LogWriterUtils.getLogWriter().fine("Cache created in successfully");
     }
     
@@ -77,8 +77,8 @@ public class ClearMultiVmCallBkDUnitTest extends DistributedTestCase{
       Host host = Host.getHost(0);
       VM vm0 = host.getVM(0);
       VM vm1 = host.getVM(1);
-      vm0.invoke(ClearMultiVmCallBkDUnitTest.class, "closeCache");
-      vm1.invoke(ClearMultiVmCallBkDUnitTest.class, "closeCache");
+      vm0.invoke(() -> ClearMultiVmCallBkDUnitTest.closeCache());
+      vm1.invoke(() -> ClearMultiVmCallBkDUnitTest.closeCache());
     }
     
     public static void createCache(){
@@ -134,13 +134,13 @@ public class ClearMultiVmCallBkDUnitTest extends DistributedTestCase{
         }
         LogWriterUtils.getLogWriter().fine("Did all puts successfully");
         
-        vm0.invoke(ClearMultiVmCallBkDUnitTest.class,"clearMethod");
+        vm0.invoke(() -> ClearMultiVmCallBkDUnitTest.clearMethod());
         LogWriterUtils.getLogWriter().fine("Did clear successfully");
         
         while(afterClear){
         }       
         
-        int Regsize = vm0.invokeInt(ClearMultiVmCallBkDUnitTest.class, "sizeMethod");
+        int Regsize = vm0.invoke(() -> ClearMultiVmCallBkDUnitTest.sizeMethod());
         assertEquals(1, Regsize);
         
         
@@ -159,14 +159,14 @@ public class ClearMultiVmCallBkDUnitTest extends DistributedTestCase{
             vm1.invoke(ClearMultiVmCallBkDUnitTest.class, "getMethod", objArr);
         }
         LogWriterUtils.getLogWriter().fine("Did all puts successfully");
-        //vm0.invoke(ClearMultiVmCallBkDUnitTest.class,"putMethod");
-        vm1.invoke(ClearMultiVmCallBkDUnitTest.class,"clearMethod");
+        //vm0.invoke(() -> ClearMultiVmCallBkDUnitTest.putMethod());
+        vm1.invoke(() -> ClearMultiVmCallBkDUnitTest.clearMethod());
         LogWriterUtils.getLogWriter().fine("Did clear successfully");
         
         while(afterClear){
         }       
         
-        int Regsize = vm0.invokeInt(ClearMultiVmCallBkDUnitTest.class, "sizeMethod");
+        int Regsize = vm0.invoke(() -> ClearMultiVmCallBkDUnitTest.sizeMethod());
         assertEquals(1, Regsize);
         
         

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java
index 8553fe6..955b24f 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmDUnitTest.java
@@ -71,8 +71,8 @@ public class ClearMultiVmDUnitTest extends DistributedTestCase{
       Host host = Host.getHost(0);
       VM vm0 = host.getVM(0);
       VM vm1 = host.getVM(1);
-      vm0.invoke(ClearMultiVmDUnitTest.class, "createCache");
-      vm1.invoke(ClearMultiVmDUnitTest.class, "createCache");
+      vm0.invoke(() -> ClearMultiVmDUnitTest.createCache());
+      vm1.invoke(() -> ClearMultiVmDUnitTest.createCache());
     }
     
     @Override
@@ -80,8 +80,8 @@ public class ClearMultiVmDUnitTest extends DistributedTestCase{
       Host host = Host.getHost(0);
       VM vm0 = host.getVM(0);
       VM vm1 = host.getVM(1);
-      vm0.invoke(ClearMultiVmDUnitTest.class, "closeCache");
-      vm1.invoke(ClearMultiVmDUnitTest.class, "closeCache");
+      vm0.invoke(() -> ClearMultiVmDUnitTest.closeCache());
+      vm1.invoke(() -> ClearMultiVmDUnitTest.closeCache());
       cache = null;
       Invoke.invokeInEveryVM(new SerializableRunnable() { public void run() { cache = null; } });
     }
@@ -212,8 +212,8 @@ public class ClearMultiVmDUnitTest extends DistributedTestCase{
             vm1.invoke(ClearMultiVmDUnitTest.class, "getMethod", objArr);
         }
         
-        AsyncInvocation as1 = vm0.invokeAsync(ClearMultiVmDUnitTest.class, "firstVM");
-        AsyncInvocation as2 = vm1.invokeAsync(ClearMultiVmDUnitTest.class, "secondVM");
+        AsyncInvocation as1 = vm0.invokeAsync(() -> ClearMultiVmDUnitTest.firstVM());
+        AsyncInvocation as2 = vm1.invokeAsync(() -> ClearMultiVmDUnitTest.secondVM());
         ThreadUtils.join(as1, 30 * 1000);
         ThreadUtils.join(as2, 30 * 1000);
         
@@ -225,10 +225,10 @@ public class ClearMultiVmDUnitTest extends DistributedTestCase{
           Assert.fail("as2 failed", as2.getException());
         }
         
-        int j = vm0.invokeInt(ClearMultiVmDUnitTest.class, "sizeMethod");
+        int j = vm0.invoke(() -> ClearMultiVmDUnitTest.sizeMethod());
         assertEquals(0, j);
         
-        j = vm1.invokeInt(ClearMultiVmDUnitTest.class, "sizeMethod");
+        j = vm1.invoke(() -> ClearMultiVmDUnitTest.sizeMethod());
         assertEquals(1, j);
         
         
@@ -249,7 +249,7 @@ public class ClearMultiVmDUnitTest extends DistributedTestCase{
         VM vm0 = host.getVM(0);
         VM vm1 = host.getVM(1);
         
-        vm1.invoke(ClearMultiVmDUnitTest.class, "localDestroyRegionMethod");
+        vm1.invoke(() -> ClearMultiVmDUnitTest.localDestroyRegionMethod());
         vm0.invoke(new CacheSerializableRunnable ("exception in vm0"){
             public void run2() throws CacheException {
                try{

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
index dbbaaa8..23386a7 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
@@ -793,15 +793,12 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     });
     
     // gather details for later creation of ConnectionPool...
-    ports[0] = vm0.invokeInt(ClientMembershipDUnitTest.class, 
-                             "getTestClientMembershipEventsInClient_port");
+    ports[0] = vm0.invoke(() -> ClientMembershipDUnitTest.getTestClientMembershipEventsInClient_port());
     assertTrue(ports[0] != 0);
 
-    DistributedMember serverMember = (DistributedMember) vm0.invoke(ClientMembershipDUnitTest.class,
-    "getDistributedMember");
+    DistributedMember serverMember = (DistributedMember) vm0.invoke(() -> ClientMembershipDUnitTest.getDistributedMember());
 
-    String serverMemberId = (String) vm0.invoke(ClientMembershipDUnitTest.class,
-                                                "getMemberId");
+    String serverMemberId = (String) vm0.invoke(() -> ClientMembershipDUnitTest.getMemberId());
 
     com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] ports[0]=" + ports[0]);
     com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] serverMember=" + serverMember);
@@ -1078,10 +1075,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
 
     // create bridge client in vm0...
     vm0.invoke(createConnectionPool);
-    String clientMemberId = (String) vm0.invoke(ClientMembershipDUnitTest.class,
-                                                "getMemberId");
-    DistributedMember clientMember = (DistributedMember) vm0.invoke(ClientMembershipDUnitTest.class,
-                                                "getDistributedMember");
+    String clientMemberId = (String) vm0.invoke(() -> ClientMembershipDUnitTest.getMemberId());
+    DistributedMember clientMember = (DistributedMember) vm0.invoke(() -> ClientMembershipDUnitTest.getDistributedMember());
                                                 
     synchronized(listener) {
       if (!fired[JOINED] && !fired[LEFT] && !fired[CRASHED]) {
@@ -1144,8 +1139,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
 
     // reconnect bridge client to test for crashed event
     vm0.invoke(createConnectionPool);
-    clientMemberId = (String) vm0.invoke(ClientMembershipDUnitTest.class,
-                                         "getMemberId");
+    clientMemberId = (String) vm0.invoke(() -> ClientMembershipDUnitTest.getMemberId());
                                                 
     synchronized(listener) {
       if (!fired[JOINED] && !fired[LEFT] && !fired[CRASHED]) {
@@ -1357,8 +1351,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       final VM vm = Host.getHost(0).getVM(i);
       System.out.println("creating pool in vm_"+i);
       vm.invoke(createPool);
-      clientMemberIdArray[i] =  String.valueOf(vm.invoke(
-        ClientMembershipDUnitTest.class, "getMemberId"));
+      clientMemberIdArray[i] =  String.valueOf(vm.invoke(() -> ClientMembershipDUnitTest.getMemberId()));
     }
     Collection clientMemberIds = Arrays.asList(clientMemberIdArray);
                                                 
@@ -1436,8 +1429,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
             getDistributedMember());
         }
       });
-      ports[whichVM] = vm.invokeInt(ClientMembershipDUnitTest.class, 
-                                    "getTestGetConnectedServers_port");
+      ports[whichVM] = vm.invoke(() -> ClientMembershipDUnitTest.getTestGetConnectedServers_port());
       assertTrue(ports[whichVM] != 0);
     }
     
@@ -1543,8 +1535,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
             getMemberId());
         }
       });
-      ports[whichVM] = vm.invokeInt(ClientMembershipDUnitTest.class, 
-                                    "getTestGetNotifiedClients_port");
+      ports[whichVM] = vm.invoke(() -> ClientMembershipDUnitTest.getTestGetNotifiedClients_port());
       assertTrue(ports[whichVM] != 0);
     }
     
@@ -1587,8 +1578,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
           }
         }
       });
-      clientCounts[whichVM] = vm.invokeInt(ClientMembershipDUnitTest.class, 
-                              "getTestGetNotifiedClients_clientCount");
+      clientCounts[whichVM] = vm.invoke(() -> ClientMembershipDUnitTest.getTestGetNotifiedClients_clientCount());
     }
     
     // only one server should have a notifier for this client...

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java
index a734a10..f7e2277 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java
@@ -86,8 +86,7 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
         LogWriterUtils.getLogWriter().info("[testBug35381] serverMemberId=" + getMemberId());
       }
     });
-    ports[whichVM] = vm.invokeInt(ClientRegisterInterestDUnitTest.class, 
-                                  "getBridgeServerPort");
+    ports[whichVM] = vm.invoke(() -> ClientRegisterInterestDUnitTest.getBridgeServerPort());
     assertTrue(ports[whichVM] != 0);
     
     LogWriterUtils.getLogWriter().info("[testBug35381] create bridge client");
@@ -208,11 +207,9 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
     });
 
     // get the bridge server ports...
-    ports[firstServerIdx] = firstServerVM.invokeInt(
-      ClientRegisterInterestDUnitTest.class, "getBridgeServerPort");
+    ports[firstServerIdx] = firstServerVM.invoke(() -> ClientRegisterInterestDUnitTest.getBridgeServerPort());
     assertTrue(ports[firstServerIdx] != 0);
-    ports[secondServerIdx] = secondServerVM.invokeInt(
-      ClientRegisterInterestDUnitTest.class, "getBridgeServerPort");
+    ports[secondServerIdx] = secondServerVM.invoke(() -> ClientRegisterInterestDUnitTest.getBridgeServerPort());
     assertTrue(ports[secondServerIdx] != 0);
     assertTrue(ports[firstServerIdx] != ports[secondServerIdx]);
     


Mime
View raw message