Skip to content

Commit

Permalink
Add sleep to unit tests to resolve edge-case failure
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Dec 27, 2024
1 parent 22da7e9 commit 9a89b0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/hana_util_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 9a89b0c

Please sign in to comment.