@Test
public void executionGetsAnotherConn() throws ConnectionException, InterruptedException, IOException {

  initPool(Integer.MAX_VALUE, // high keep-alive so it won't get in the way...
      1, // only one node, we don't want to block, though!
      Integer.MAX_VALUE, //
      .95);
  try {
    QueryUuid.setCurrentQueryUuidAndExecutionUuid(UUID.randomUUID(), UUID.randomUUID());
    TestConnection<ClusterManagementService.Iface> conn = (TestConnection<ClusterManagementService.Iface>) pool
        .reserveConnection(ClusterManagementService.Iface.class, ADDR1, null);
    int connId = conn.getId();
    Assert.assertEquals(conn.getServiceInfo().getServiceInterface(), ClusterManagementService.Iface.class,
        "Correct service expected");
    // request another connection to another node. We would break the limit, though we want that connection for the
    // same executionUuid, therefore we should get it without blocking.
    TestConnection<ClusterManagementService.Iface> conn2 = (TestConnection<ClusterManagementService.Iface>) pool
        .reserveConnection(ClusterManagementService.Iface.class, ADDR2, null);
    conn2.close();
    conn.close();
    Assert.assertNotEquals(conn2.getId(), connId,
        "Expected that connection was not re-used, as both connections should be open at the same time");
    Assert.assertEquals(conn2.getServiceInfo().getServiceInterface(), ClusterManagementService.Iface.class,
        "Correct service expected");
  } finally {
    QueryUuid.clearCurrent();
  }
}