[9.18] fix: test: test_xferquota.py reloads zone file too fast

Add a 1 second delay to ensure file time stamp is different
from last load.

Closes #5366

Backport of MR !10571

Merge branch 'backport-5366-test_xferquota-py-reloads-zone-file-too-fast-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!10576
This commit is contained in:
Mark Andrews 2025-06-13 08:19:31 +00:00
commit 0aabb0b020

View file

@ -14,6 +14,7 @@ import os
import re
import shutil
import signal
import time
import dns.message
import pytest
@ -33,7 +34,8 @@ pytestmark = pytest.mark.extra_artifacts(
def test_xferquota(named_port, servers):
# Changing test zone
# Changing test zone ensuring that the time stamp changes
time.sleep(1)
shutil.copyfile("ns1/changing2.db", "ns1/changing.db")
with open("ns1/named.pid", "r", encoding="utf-8") as pidfile:
pid = int(pidfile.read())