Skip to content

Commit 33ec260

Browse files
committed
more tests for poll_query_until()
1 parent 18fccb6 commit 33ec260

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/test_simple.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,21 @@ def test_poll_query_until(self):
409409
max_attempts=3,
410410
sleep_time=0.01)
411411

412+
# check ProgrammingError, fail
413+
with self.assertRaises(testgres.ProgrammingError):
414+
node.poll_query_until(
415+
dbname='postgres',
416+
query='dummy1')
417+
418+
# check ProgrammingError, ok
419+
with self.assertRaises(TimeoutException):
420+
node.poll_query_until(
421+
dbname='postgres',
422+
query='dummy2',
423+
max_attempts=3,
424+
sleep_time=0.01,
425+
raise_programming_error=False)
426+
412427
def test_logging(self):
413428
logfile = tempfile.NamedTemporaryFile('w', delete=True)
414429

0 commit comments

Comments
 (0)