Retry flaky test

This commit is contained in:
Kovid Goyal 2024-03-26 08:03:20 +05:30
parent 7ade6f97e9
commit 4d93801d5f
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -8,6 +8,7 @@
import shutil
import subprocess
import tempfile
import time
from contextlib import suppress
from functools import lru_cache
@ -188,6 +189,13 @@ def test_ssh_login_shell_detection(self):
self.assertIn(expected_login_shell, pty.screen_contents())
def test_ssh_shell_integration(self):
try:
return self.do_ssh_shell_integration()
except Exception:
time.sleep(1)
self.do_ssh_shell_integration()
def do_ssh_shell_integration(self):
ok_login_shell = ''
for sh in self.all_possible_sh:
for login_shell in {'fish', 'zsh', 'bash'} & set(self.all_possible_sh):