From 9a89b0c761b399de8bc7701bff8e5e28f9a431c2 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Fri, 27 Dec 2024 14:35:04 -0800 Subject: [PATCH] Add sleep to unit tests to resolve edge-case failure --- tests/hana_util_tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/hana_util_tests.py b/tests/hana_util_tests.py index 278c998d..05a56485 100644 --- a/tests/hana_util_tests.py +++ b/tests/hana_util_tests.py @@ -32,7 +32,7 @@ from os import remove from os.path import join, dirname, isfile from shutil import copy -from time import time +from time import time, sleep from unittest.mock import patch @@ -152,6 +152,7 @@ def _write_token(*_, **__): self.assertEqual(credentials_on_disk, _client_config) # Test refresh of existing token (no auth) + sleep(1) # sleep to ensure new credentials expire later than existing _refresh_token(self.test_server) get_token.assert_called_once() with open(self.test_path) as f: