1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-03 09:59:53 +02:00

fix ptrack

This commit is contained in:
sfalkon 2017-11-07 13:52:00 +03:00
parent 855e5afab4
commit 9804672a10
2 changed files with 5 additions and 7 deletions

View File

@ -231,7 +231,7 @@ class ProbackupTest(object):
def get_md5_per_page_for_fork(self, file, size_in_pages):
pages_per_segment = {}
md5_per_page = {}
nsegments = size_in_pages / 131072
nsegments = size_in_pages // 131072
if size_in_pages % 131072 != 0:
nsegments = nsegments + 1
# print("Size: {0}".format(size_in_pages))

View File

@ -3,14 +3,12 @@ import unittest
from .helpers.ptrack_helpers import ProbackupTest, ProbackupException
from datetime import datetime, timedelta
import subprocess
try:
from testgres import ClusterException
except:
from testgres import ClusterTestgresException as ClusterException
import shutil, sys, time
from testgres import QueryException
module_name = 'ptrack'
@ -444,7 +442,7 @@ class PtrackBackupTest(ProbackupTest, unittest.TestCase):
# we should die here because exception is what we expect to happen
self.assertEqual(1, 0, "Expecting Error because we are connecting to deleted database.\n Output: {0} \n CMD: {1}".format(
repr(self.output), self.cmd))
except ClusterException as e:
except QueryException as e:
self.assertTrue('FATAL: database "db1" does not exist' in e.message,
'\n Unexpected Error Message: {0}\n CMD: {1}'.format(repr(e.message), self.cmd))