mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix nonsensical in fileclient timeout error message
This commit is contained in:
parent
15616715d4
commit
abe92390c3
3 changed files with 4 additions and 2 deletions
1
changelog/65752.fixed.md
Normal file
1
changelog/65752.fixed.md
Normal file
|
@ -0,0 +1 @@
|
|||
Fix nonsensical time in fileclient timeout error.
|
|
@ -1157,7 +1157,7 @@ class RemoteClient(Client):
|
|||
)
|
||||
except salt.exceptions.SaltReqTimeoutError:
|
||||
raise SaltClientError(
|
||||
f"File client timed out after {int(time.time() - start)}"
|
||||
f"File client timed out after {int(time.monotonic() - start)}"
|
||||
)
|
||||
|
||||
def destroy(self):
|
||||
|
|
|
@ -126,7 +126,8 @@ def test_fileclient_timeout(minion_opts, master_opts):
|
|||
# Crypticle must return bytes to pass to transport.RequestClient.send
|
||||
client.auth._crypticle = Mock()
|
||||
client.auth._crypticle.dumps = mock_dumps
|
||||
with pytest.raises(salt.exceptions.SaltClientError):
|
||||
msg = r"^File client timed out after \d{1,4}$"
|
||||
with pytest.raises(salt.exceptions.SaltClientError, match=msg):
|
||||
client.file_list()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue