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:
parent
855e5afab4
commit
9804672a10
@ -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))
|
||||
|
@ -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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user