@Test
  public void testRemoteMultiKeyExecution_timeout() throws Exception {
    VM accessor = getHost(0).getVM(3);
    VM datastore0 = getHost(0).getVM(0);
    VM datastore1 = getHost(0).getVM(1);
    VM datastore2 = getHost(0).getVM(2);

    accessor.invoke(() -> {
      createPartitionedRegion(regionName, 0, 0);
    });

    datastore0.invoke(() -> {
      createPartitionedRegion(regionName, 10, 0);
      FunctionService.registerFunction(new TestFunction(true, TEST_FUNCTION2));
    });

    datastore1.invoke(() -> {
      createPartitionedRegion(regionName, 10, 0);
      FunctionService.registerFunction(new TestFunction(true, TEST_FUNCTION2));
    });

    datastore2.invoke(() -> {
      createPartitionedRegion(regionName, 10, 0);
      FunctionService.registerFunction(new TestFunction(true, TEST_FUNCTION2));
    });

    accessor.invoke(() -> {
      PartitionedRegion pr = getPartitionedRegion(regionName);

      Set<String> keySet = new HashSet<>();
      for (int i = pr.getTotalNumberOfBuckets() * 2; i > 0; i--) {
        keySet.add(STRING_KEY + i);
      }

      int valueIndex = 0;
      for (String key : keySet) {
        int value = valueIndex++;
        pr.put(key, value);
      }

      Function<Object> function = new TestFunction<>(true, TEST_FUNCTION2);
      FunctionService.registerFunction(function);
      Execution<String, Object, List<Object>> dataSet = FunctionService.onRegion(pr);

      ResultCollector<Object, List<Object>> resultCollector =
          dataSet.withFilter(keySet).setArguments("TestingTimeOut").execute(function.getId());

      List<Object> resultList = resultCollector.getResult(10, TimeUnit.SECONDS);
      assertThat(resultList).hasSize(3).containsExactly(null, null, null);
    });
  }
Test multi-key remote execution by a pure accessor which doesn't have the function factory
present. ResultCollector = DefaultResultCollector haveResults = true; result Timeout = 10
milliseconds expected result to be 0.(as the execution gets the timeout)
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/execute/PRFunctionExecutionDUnitTest.java