mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
Closing a Connection or Statement object twice should be a no-op
instead of throwing an Exception. Per report from Victor Sergienko.
This commit is contained in:
@@ -10,7 +10,7 @@ import java.sql.*;
|
||||
*
|
||||
* PS: Do you know how difficult it is to type on a train? ;-)
|
||||
*
|
||||
* $Id: ConnectionTest.java,v 1.10 2002/10/17 05:33:52 barry Exp $
|
||||
* $Id: ConnectionTest.java,v 1.10.6.1 2004/02/24 13:11:44 jurka Exp $
|
||||
*/
|
||||
|
||||
public class ConnectionTest extends TestCase
|
||||
@@ -347,4 +347,14 @@ public class ConnectionTest extends TestCase
|
||||
assertTrue(ex.getMessage(), false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Closing a Connection more than once is not an error.
|
||||
*/
|
||||
public void testDoubleClose() throws SQLException
|
||||
{
|
||||
Connection con = TestUtil.openDB();
|
||||
con.close();
|
||||
con.close();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user