mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 02:43:43 +03:00
Fix error test for invalid START_REPLICATION command.
This commit is contained in:
parent
09a4bb70a1
commit
5d33b39829
|
@ -126,8 +126,14 @@ class ReplicationTest(ReplicationTestCase):
|
||||||
|
|
||||||
self.create_replication_slot(cur, output_plugin='test_decoding')
|
self.create_replication_slot(cur, output_plugin='test_decoding')
|
||||||
|
|
||||||
self.assertRaises(psycopg2.DataError, cur.start_replication,
|
# try with invalid options
|
||||||
slot_name=self.slot, options=dict(invalid_param='value'))
|
cur.start_replication(slot_name=self.slot, options={'invalid_param': 'value'})
|
||||||
|
def consume(msg):
|
||||||
|
pass
|
||||||
|
# we don't see the error from the server before we try to read the data
|
||||||
|
self.assertRaises(psycopg2.DataError, cur.consume_stream, consume)
|
||||||
|
|
||||||
|
# try with correct command
|
||||||
cur.start_replication(slot_name=self.slot)
|
cur.start_replication(slot_name=self.slot)
|
||||||
|
|
||||||
@skip_before_postgres(9, 4) # slots require 9.4
|
@skip_before_postgres(9, 4) # slots require 9.4
|
||||||
|
|
Loading…
Reference in New Issue
Block a user