@Override public void close() { close(CloseMode.GRACEFUL); }
@Override public void close() { close(CloseMode.GRACEFUL); }
@Test public void testShutdown() throws Exception { final StrictConnPool<String, HttpConnection> pool = new StrictConnPool<>(2, 2); pool.close(CloseMode.GRACEFUL); try { pool.lease("somehost", null); Assert.fail("IllegalStateException should have been thrown"); } catch (final IllegalStateException expected) { } // Ignored if shut down pool.release(new PoolEntry<String, HttpConnection>("somehost"), true); }