@Override
  public BrokerResponse executeQuery(String brokerAddress, String query)
      throws PinotClientException {
    try {
      return executeQueryAsync(brokerAddress, query).get(_brokerReadTimeout, TimeUnit.MILLISECONDS);
    } catch (Exception e) {
      throw new PinotClientException(e);
    }
  }
@Test
  public void serverResponseExceedsBrokerReadTimeoutThreshold() {
    long brokerReadTimeoutMs = 100;
    _responseJson = _VALID_RESPONSE_JSON;
    _responseDelayMs = brokerReadTimeoutMs + 50;
    JsonAsyncHttpPinotClientTransportFactory factory = new JsonAsyncHttpPinotClientTransportFactory();
    Properties connectionProps = new Properties();
    connectionProps.put("brokerReadTimeoutMs", String.valueOf(brokerReadTimeoutMs));
    factory.withConnectionProperties(connectionProps);
    JsonAsyncHttpPinotClientTransport transport = (JsonAsyncHttpPinotClientTransport) factory.buildTransport();
    try {
      transport.executeQuery("localhost:" + _dummyServer.getAddress().getPort(), "select * from planets");
      fail("expected exception was not thrown");
    } catch (PinotClientException exception) {
      Throwable cause = ExceptionUtils.getRootCause(exception);
      assertEquals(cause.getClass().getName(), "java.util.concurrent.TimeoutException");
    }
  }