@Test
  public void nonHAFunctionResultCollectorIsPassedPartialResultsAfterCloseCache() {
    List<InternalDistributedMember> members = getAllMembers();

    InternalDistributedMember firstMember = members.iterator().next();

    // Execute a function which will close the cache on one member.
    try {
      ResultCollector rc = getExecution().withCollector(customCollector)
          .execute(new CacheClosingNonHAFunction(firstMember));
      rc.getResult();
      fail("Should have thrown an exception");
    } catch (Exception expected) {
      // do nothing
    }
    members.remove(firstMember);
    assertEquals(members, customCollector.getResult());
    assertEquals(numberOfExecutions() - 1, customCollector.getResult().size());
  }
Test that a custom result collector will still receive all partial results from other members
when one member fails
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/execute/FunctionServiceBase.java