sapling/eden/scm/tests/test-ssh-hang.t
Xavier Deguillard 5cfd0fd8ba sshpeer: backport connection timeout hotfix
Summary:
On macOS, it appears that ssh has a ~1% chance of never being able to connect
too the server and just hang. This caused mactest to be completely unhealthy
for a couple of days and a similar hotfix was applied to mitigate the issue.

Since it proved to be working, let's now backport this hotfix in the actual
code.

Reviewed By: DurhamG

Differential Revision: D22953230

fbshipit-source-id: ead7662ea6d0a33efaa5c4044c9391b2835ee421
2020-08-11 22:57:20 -07:00

17 lines
408 B
Perl

#chg-compatible
$ configure modern
$ newserver repo
$ clone repo localrepo
$ switchrepo localrepo
$ cat >> sleep30.py <<EOF
> import time
> time.sleep(30)
> EOF
$ hg pull --config ui.ssh="$PYTHON ./sleep30.py" --config ui.sshsetuptimeout=1
pulling from ssh://user@dummy/repo
timed out establishing the ssh connection, killing ssh
abort: no suitable response from remote hg!
[255]