diff --git a/tests.py b/tests.py index 6009ee2..0c47fe4 100644 --- a/tests.py +++ b/tests.py @@ -336,6 +336,22 @@ class MomokoConnectionServerSideCursorTest(BaseDataTest): yield self.conn.execute("CLOSE all_ints") yield self.conn.execute("COMMIT") + @gen_test + def test_abort_on_close(self): + # issue $140 + int_count = 10000 + yield self.fill_int_data(int_count) + + conn = yield momoko.connect(good_dsn, ioloop=self.io_loop) + yield conn.execute("BEGIN") + yield conn.execute("DECLARE all_ints CURSOR FOR SELECT * FROM unit_test_int_table") + cursor_future = conn.execute("FETCH 2000 FROM all_ints") + + conn.close() + + cursor = yield cursor_future + cursor.fetchall() + class MomokoConnectionSetsessionTest(BaseTest): @gen_test