From d8e8247c6d438e7d30df0b50009c08c72d9febca Mon Sep 17 00:00:00 2001 From: Rayyan Ansari Date: Mon, 28 Nov 2022 17:07:48 +0000 Subject: [PATCH] testsuite: archiver: increase hashing test bytes A lower value results in the hash running too fast and the time being rounded down to 0.0, resulting in the test failing. --- src/borg/testsuite/archiver/create_cmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/borg/testsuite/archiver/create_cmd.py b/src/borg/testsuite/archiver/create_cmd.py index 68f01c187..0d4a5c6bf 100644 --- a/src/borg/testsuite/archiver/create_cmd.py +++ b/src/borg/testsuite/archiver/create_cmd.py @@ -786,7 +786,7 @@ def extract_hashing_time(borg_create_output): # Test case set up: create a repository and a file self.cmd(f"--repo={self.repository_location}", "rcreate", "--encryption=none") - self.create_regular_file("testfile", contents=randbytes(15000000)) # more data might be needed for faster CPUs + self.create_regular_file("testfile", contents=randbytes(50000000)) # Archive result = self.cmd(f"--repo={self.repository_location}", "create", "--stats", "test_archive", self.input_path) hashing_time = extract_hashing_time(result) @@ -804,7 +804,7 @@ def extract_chunking_time(borg_create_output): # Test case set up: create a repository and a file self.cmd(f"--repo={self.repository_location}", "rcreate", RK_ENCRYPTION) - self.create_regular_file("testfile", contents=randbytes(10000000)) + self.create_regular_file("testfile", contents=randbytes(50000000)) # Archive result = self.cmd(f"--repo={self.repository_location}", "create", "--stats", "test_archive", self.input_path) chunking_time = extract_chunking_time(result)