Skip to content

Commit da2fad9

Browse files
authored
[AP-1138] More unit tests to increase the coverage (transferwise#162)
* added more unit tests * fixed timezone value in the test
1 parent 7135968 commit da2fad9

File tree

3 files changed

+691
-5
lines changed

3 files changed

+691
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ start_db:
1313

1414
test:
1515
. ./venv/bin/activate ;\
16-
pytest --cov=tap_postgres --cov-fail-under=68 tests -v
16+
pytest --cov=tap_postgres --cov-fail-under=85 tests -v

tap_postgres/sync_strategies/logical_replication.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,8 @@ def fetch_current_lsn(conn_config):
9898
# Use version specific lsn command
9999
if version >= 100000:
100100
cur.execute("SELECT pg_current_wal_lsn() AS current_lsn")
101-
elif version >= 90400:
102-
cur.execute("SELECT pg_current_xlog_location() AS current_lsn")
103101
else:
104-
raise Exception('Logical replication not supported before PostgreSQL 9.4')
102+
cur.execute("SELECT pg_current_xlog_location() AS current_lsn")
105103

106104
current_lsn = cur.fetchone()[0]
107105
return lsn_to_int(current_lsn)

0 commit comments

Comments
 (0)