diff --git a/tests/helpers/ptrack_helpers.py b/tests/helpers/ptrack_helpers.py index 896366fa..bbb221b0 100644 --- a/tests/helpers/ptrack_helpers.py +++ b/tests/helpers/ptrack_helpers.py @@ -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)) diff --git a/tests/ptrack.py b/tests/ptrack.py index de93d36c..169b7b5f 100644 --- a/tests/ptrack.py +++ b/tests/ptrack.py @@ -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))