public void testConnectionReleased() throws IOException { dataStore.getConnectionLifecycleListeners().add(new ExceptionListener()); // get a count repeatedly, if we fail to release the connections this will eventually lock // up for (int i = 0; i < 100; i++) { // we don't actually expect an exception to percolate up since it's happening // on the closeSafe method, that swallows exceptions featureStore.getCount(Query.ALL); } }
Filter filter = ff.equal(ff.property(key), ff.literal(keyValue), false); assertEquals(1, fs.getCount(new Query(tname("nonfirst"), filter)));