private void executeFunctionToVerifyClientTimeoutOnServer(
      final ExecutionTarget functionServiceTarget, final int propertyTimeout,
      final int executeTimeout) {
    assertThat(functionServiceTarget).isNotNull();

    int timeout;
    if (executeTimeout > 0) {
      timeout = executeTimeout;
    } else {
      timeout = propertyTimeout;
    }

    Function<Integer> function = new CheckClientReadTimeout();
    FunctionService.registerFunction(function);
    Execution<Integer, Boolean, List<Boolean>> execution = null;

    if (functionServiceTarget == ExecutionTarget.REGION) {
      execution =
          FunctionService.onRegion(clientCache.getRegion(regionName)).setArguments(timeout);
    } else {
      execution = FunctionService.onServer(clientCache.getDefaultPool()).setArguments(timeout);
    }

    ResultCollector<Boolean, List<Boolean>> resultCollector;
    if (executeTimeout > 0) {
      resultCollector = execution.execute(function, timeout, TimeUnit.MILLISECONDS);
    } else {
      resultCollector = execution.execute(function);
    }

    String description = "Server did not read client_function_timeout from client.";
    assertThat(resultCollector.getResult().get(0)).as(description).isTrue();
  }
Server should terminate client function execution when it times out. Client sends
CLIENT_FUNCTION_TIMEOUT to server when default is overridden by client.

<p>
TRAC #51193: The function execution connection on the server is never terminated even if the
gemfire.CLIENT_FUNCTION_TIMEOUT property is set
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/execute/ClientFunctionTimeoutRegressionTest.java