From 5b4685eb3ab662a00102fcac45bb0d6667e7dd56 Mon Sep 17 00:00:00 2001 From: Grigory Smolkin Date: Wed, 17 Apr 2019 02:13:56 +0300 Subject: [PATCH] tests: fix missing _ptrack fork for 0 sized relations --- tests/helpers/ptrack_helpers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/helpers/ptrack_helpers.py b/tests/helpers/ptrack_helpers.py index fe730354..55eafc2c 100644 --- a/tests/helpers/ptrack_helpers.py +++ b/tests/helpers/ptrack_helpers.py @@ -431,7 +431,12 @@ class ProbackupTest(object): header_size = 24 ptrack_bits_for_fork = [] + # TODO: use macro instead of hard coded 8KB page_body_size = 8192-header_size + # Check that if main fork file size is 0, it`s ok + # to not having a _ptrack fork + if os.path.getsize(file) == 0: + return ptrack_bits_for_fork byte_size = os.path.getsize(file + '_ptrack') npages = byte_size/8192 if byte_size % 8192 != 0: