1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-09-16 09:26:30 +02:00

tests: move ptrack module to python3

This commit is contained in:
Grigory Smolkin
2020-11-04 16:31:22 +00:00
parent c796ab2c42
commit e806cf957e

View File

@@ -89,7 +89,7 @@ class PtrackTest(ProbackupTest, unittest.TestCase):
xid = node.safe_psql(
'postgres',
'SELECT txid_current()').rstrip()
'SELECT txid_current()').decode('utf-8').rstrip()
pgbench.wait()
self.backup_node(backup_dir, 'node', node, backup_type='ptrack')
@@ -126,7 +126,7 @@ class PtrackTest(ProbackupTest, unittest.TestCase):
'select (select sum(tbalance) from pgbench_tellers) - '
'( select sum(bbalance) from pgbench_branches) + '
'( select sum(abalance) from pgbench_accounts ) - '
'(select sum(delta) from pgbench_history) as must_be_zero').rstrip()
'(select sum(delta) from pgbench_history) as must_be_zero').decode('utf-8').rstrip()
self.assertEqual('0', balance)
@@ -275,7 +275,7 @@ class PtrackTest(ProbackupTest, unittest.TestCase):
'select (select sum(tbalance) from pgbench_tellers) - '
'( select sum(bbalance) from pgbench_branches) + '
'( select sum(abalance) from pgbench_accounts ) - '
'(select sum(delta) from pgbench_history) as must_be_zero').rstrip()
'(select sum(delta) from pgbench_history) as must_be_zero').decode('utf-8').rstrip()
self.assertEqual('0', balance)
@@ -1108,6 +1108,13 @@ class PtrackTest(ProbackupTest, unittest.TestCase):
if self.paranoia:
pgdata = self.pgdata_content(node.data_dir)
node.safe_psql(
"postgres",
"insert into t_heap select i as id,"
" md5(i::text) as text,"
" md5(i::text)::tsvector as tsvector"
" from generate_series(200, 300) i")
# Drop Node
node.cleanup()