Skip to content
This repository was archived by the owner on Sep 23, 2024. It is now read-only.

Commit 6dc8394

Browse files
Bump psycopg2-binary from 2.8.6 to 2.9.3 (#141)
1 parent b78ba51 commit 6dc8394

File tree

2 files changed

+24
-15
lines changed

2 files changed

+24
-15
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
],
1919
install_requires=[
2020
'pipelinewise-singer-python==1.*',
21-
'psycopg2-binary==2.8.6',
21+
'psycopg2-binary==2.9.3',
2222
'strict-rfc3339==0.7',
2323
],
2424
extras_require={

tests/test_full_table_interruption.py

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,25 @@ def test_catalog(self):
7373
cow_stream = select_all_of_stream(cow_stream)
7474
cow_stream = set_replication_method_for_stream(cow_stream, 'LOG_BASED')
7575

76-
with get_test_connection() as conn:
77-
conn.autocommit = True
78-
cur = conn.cursor()
76+
conn = get_test_connection()
77+
conn.autocommit = True
7978

80-
cow_rec = {'name' : 'betty', 'colour' : 'blue',
79+
with conn.cursor() as cur:
80+
cow_rec = {'name': 'betty', 'colour': 'blue',
8181
'timestamp_ntz': '2020-09-01 10:40:59', 'timestamp_tz': '2020-09-01 00:50:59+02'}
8282
insert_record(cur, 'COW', cow_rec)
8383

84-
cow_rec = {'name' : 'smelly', 'colour' : 'brow',
84+
cow_rec = {'name': 'smelly', 'colour': 'brow',
8585
'timestamp_ntz': '2020-09-01 10:40:59 BC', 'timestamp_tz': '2020-09-01 00:50:59+02 BC'}
8686
insert_record(cur, 'COW', cow_rec)
8787

88-
cow_rec = {'name' : 'pooper', 'colour' : 'green',
88+
cow_rec = {'name': 'pooper', 'colour': 'green',
8989
'timestamp_ntz': '30000-09-01 10:40:59', 'timestamp_tz': '10000-09-01 00:50:59+02'}
9090
insert_record(cur, 'COW', cow_rec)
9191

92+
conn.close()
93+
94+
blew_up_on_cow = False
9295
state = {}
9396
#the initial phase of cows logical replication will be a full table.
9497
#it will sync the first record and then blow up on the 2nd record
@@ -232,22 +235,28 @@ def test_catalog(self):
232235
self.assertIsNotNone(chicken_stream)
233236
chicken_stream = select_all_of_stream(chicken_stream)
234237
chicken_stream = set_replication_method_for_stream(chicken_stream, 'FULL_TABLE')
235-
with get_test_connection() as conn:
236-
conn.autocommit = True
237-
cur = conn.cursor()
238238

239-
cow_rec = {'name' : 'betty', 'colour' : 'blue'}
240-
insert_record(cur, 'COW', cow_rec)
241-
cow_rec = {'name' : 'smelly', 'colour' : 'brow'}
239+
conn = get_test_connection()
240+
conn.autocommit = True
241+
242+
with conn.cursor() as cur:
243+
cow_rec = {'name': 'betty', 'colour': 'blue'}
244+
insert_record(cur, 'COW', {'name': 'betty', 'colour': 'blue'})
245+
246+
cow_rec = {'name': 'smelly', 'colour': 'brow'}
242247
insert_record(cur, 'COW', cow_rec)
243248

244-
cow_rec = {'name' : 'pooper', 'colour' : 'green'}
249+
cow_rec = {'name': 'pooper', 'colour': 'green'}
245250
insert_record(cur, 'COW', cow_rec)
246251

247-
chicken_rec = {'name' : 'fred', 'colour' : 'red'}
252+
chicken_rec = {'name': 'fred', 'colour': 'red'}
248253
insert_record(cur, 'CHICKEN', chicken_rec)
249254

255+
conn.close()
256+
250257
state = {}
258+
blew_up_on_cow = False
259+
251260
#this will sync the CHICKEN but then blow up on the COW
252261
try:
253262
tap_postgres.do_sync(get_test_connection_config(), {'streams' : streams}, None, state)

0 commit comments

Comments
 (0)