@Override public Connection exchangeConnection(Connection conn, Set excludedServers, long aquireTimeout) { if (excludedServers.size() >= numServers) { throw new NoAvailableServersException(); } exchanges++; return new DummyConnection(new ServerLocation("localhost", currentServer++ % numServers)); }
getLogWriter().info("Got expected NoAvailableServers when doing getAll: " + ex.getCause()); } else { fail("Got unexpected exception when doing getAll", ex);
throw new ServerOperationException(e); } catch (ServerRefusedConnectionException srce) { throw new NoAvailableServersException(srce); } finally { if (needToUndoEstimate && newConnection == null) { throw new NoAvailableServersException();
if (expectedResult == NO_AVAILABLE_SERVERS) { getLogWriter() .info("Got expected NoAvailableServers when executing function: " + ex.getCause()); } else { fail("Got unexpected exception when executing function", ex);
throw new ServerOperationException(e); } catch (ServerRefusedConnectionException srce) { throw new NoAvailableServersException(srce); } finally { throw new NoAvailableServersException();
if (expectedResult == NO_AVAILABLE_SERVERS) { getLogWriter() .info("Got expected NoAvailableServers when executing query: " + ex.getCause()); } else { fail("Got unexpected exception when executing query", ex);
getLogWriter().info("Got expected NoAvailableServers when doing queries: " + ex.getCause()); } else { fail("Got unexpected exception when doing queries", ex);
if (expectedResult == NO_AVAILABLE_SERVERS) { getLogWriter() .info("Got expected NoAvailableServers when doing destroys: " + ex.getCause()); continue; } else {
if (expectedResult == NO_AVAILABLE_SERVERS) { getLogWriter() .info("Got expected NoAvailableServers when doing invalidates: " + ex.getCause()); continue; } else {
if (expectedResult == NO_AVAILABLE_SERVERS) { getLogWriter() .info("Got expected NoAvailableServers when doing containsKey: " + ex.getCause()); continue; } else {
if (expectedResult == NO_AVAILABLE_SERVERS) { getLogWriter() .info("Got expected NoAvailableServers when doing region destroy: " + ex.getCause()); } else { fail("Got unexpected exception when doing region destroy", ex);
getLogWriter().info("Got expected NoAvailableServers when doing puts: " + ex.getCause()); continue; } else {
getLogWriter().info("Got expected NoAvailableServers when doing gets: " + ex.getCause()); continue; } else {