public void TestErrorInPreparedStatementCausesReleaseConnectionToThrowException()
{
using (var conn = OpenConnection())
{
// This is caused by having an error with the prepared statement and later, Npgsql is trying to release the plan as it was successful created.
var cmd = new NpgsqlCommand("sele", conn);
Assert.That(() => cmd.Prepare(), Throws.Exception.TypeOf<PostgresException>());
}
}