Return the number of prepared xacts currently in the test db.
(self)
| 67 | self.conn.execute("TRUNCATE test_tpc") |
| 68 | |
| 69 | def count_xacts(self): |
| 70 | """Return the number of prepared xacts currently in the test db.""" |
| 71 | cur = self.conn.execute( |
| 72 | """ |
| 73 | select count(*) from pg_prepared_xacts |
| 74 | where database = %s""", |
| 75 | (self.conn.info.dbname,), |
| 76 | ) |
| 77 | return cur.fetchone()[0] |
| 78 | |
| 79 | def count_test_records(self): |
| 80 | """Return the number of records in the test table.""" |