@ -38,10 +38,7 @@ final class ClosedConnection
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
{
final String methodName = method.getName();
if ("isClosed".equals(methodName)) {
return Boolean.TRUE;
}
else if ("close".equals(methodName)) {
if ("close".equals(methodName)) {
return Void.TYPE;
else if ("abort".equals(methodName)) {
@ -203,7 +203,12 @@ public class TestConnections
try {
Connection connection = ds.getConnection();
connection.close();
// should no-op
connection.abort(null);
Assert.assertTrue("Connection should have closed", connection.isClosed());
Assert.assertFalse("Connection should have closed", connection.isValid(5));
Assert.assertTrue("Expected to contain ClosedConnection, but was " + connection.toString(), connection.toString().contains("ClosedConnection"));