ASF subversion and git services commented on GEODE-1653:

Commit c61028966d51db436e75ba228465767cb1a0bd21 in incubator-geode's branch 
refs/heads/feature/GEODE-2156 from [~abarve]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=c610289 ]

This closes #293

GEODE-1653: Added helper method getAllServers in ExecuteFunctionNoAckOp
to get all available servers, instead executing Fire and Forget only on the 
ones the
client is currently connected to.

GEODE-1653: Dunit test for Executing a fire-and-forget function on all
servers as opposed to only executing on the ones the client is currently
connected to.

GEODE-1653: changes after spotlessApply.

1. renamed test file to FireAndForgetFunctionOnAllServersDUnitTest and
test to testFireAndForgetFunctionOnAllServers
2. replaced thread sleep with waitUntilDeterministic function before
verifying results after Fire and Forget Function execution
3. removed commented testServerSingleKeyExecution_Bug43513_OnServer

GEODE-1653: Replacing Thread's sleep with Awatility, if the condition is not 
met during the
timeout, a ConditionTimeoutException will be thrown. This makes
analyzing the failure much simpler.

GEODE-1653: Use a larger timeout value such as 60 seconds to prevent
test from failing on slower machines or garbage collection during the

1. Code changes
  a. Added getAllServers() method to connection source, and converted
  AutoConnectionSourceImpl's findAllServers logic into it.
  b. Made relevant changes to both ExecuteFunctionNoAckOp and
  ExecuteFunctionOp classes

2. Test changes
  a. removed author tag in the test.
  b. created a new function (FireAndForgetFunctionOnAllServers) for
  test and removed it from TestFunction.
  c. test change about awaitility and actual assertion.
  d. asserted for pool's current server size after starting a new
  server and stopping existing server.

GEODE-1653: Adding missed out file for FireAndForgetFunctionOnAllServers 

GEODE-1653: Adding @Override to ExplicitConnectionSourceImpl's
getAllServers() method.

GEODE-1653: fix the test code to double check the getCurrentServer only
returns 1 server

> Executing a fire-and-forget function on all servers doesn't actually execute 
> on all servers
> -------------------------------------------------------------------------------------------
>                 Key: GEODE-1653
>                 URL: https://issues.apache.org/jira/browse/GEODE-1653
>             Project: Geode
>          Issue Type: Bug
>          Components: functions
>            Reporter: Barry Oglesby
>            Assignee: Amey Barve
> Executing a fire-and-forget function on all servers only executes on the ones 
> the client is currently connected to.
> The two {{ExecuteFunctionNoAckOp execute}} methods get the servers to execute 
> against using code like:
> {noformat}
> pool.getCurrentServers();
> {noformat}
> This method just gets all the {{EndpointManager's endpointMap's 
> ServerLocations}}.
> What should be done is more like what the {{ExecuteFunctionOp execute}} 
> methods do:
> {noformat}
> private static List<ServerLocation> getAllServers(PoolImpl pool) {
>   List<ServerLocation> servers = null;
>   if (pool.getLocators() == null || pool.getLocators().isEmpty()) {
>     servers = ((ExplicitConnectionSourceImpl) 
> pool.getConnectionSource()).getAllServers();
>   } else {
>     servers = ((AutoConnectionSourceImpl) 
> pool.getConnectionSource()).findAllServers(); // n/w call on locator
>   }
>   return servers;
> }
> {noformat}

This message was sent by Atlassian JIRA

Reply via email to