Repository navigation
Conversation
Follow-up to a459a25 libssh2#996 Follwo-up to a88a727 Follow-up to 984d008 libssh2#490
There was a problem hiding this comment.
Pull request overview
This PR corrects Windows-specific sleep behavior in the test suite so retry/backoff delays behave consistently across platforms (Windows Sleep() takes milliseconds, unlike POSIX sleep() which takes seconds).
Changes:
- Update
portable_sleep()intests/test_ssh2.cto convert seconds to milliseconds for WindowsSleep(). - Update
portable_sleep()intests/openssh_fixture.cto convert seconds to milliseconds for WindowsSleep().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_ssh2.c | Fixes Windows sleep unit conversion in the SSH2 test retry logic. |
| tests/openssh_fixture.c | Fixes Windows sleep unit conversion in the OpenSSH fixture helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR updates test helpers to correct sleep timing on Windows by converting the Sleep() argument from seconds to milliseconds, aligning Windows behavior with POSIX sleep() usage.
Changes:
- Update
portable_sleep()intests/test_ssh2.cto sleep the intended number of seconds on Windows. - Update
portable_sleep()intests/openssh_fixture.csimilarly (Windows seconds → milliseconds).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_ssh2.c | Fixes Windows retry backoff sleep duration by passing milliseconds to Sleep(). |
| tests/openssh_fixture.c | Changes Windows portable_sleep() semantics; impacts retry/backoff timing used elsewhere in this fixture code. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR adjusts retry/backoff sleep durations in the test suite to use consistent time units across Windows and non-Windows platforms, reducing flaky behavior caused by sleeps that were effectively far too long or too short.
Changes:
- Fix Windows sleep calls to use milliseconds (
Sleep(seconds * 1000)) while keeping POSIXsleep(seconds). - Correct the initial docker-machine IP retry delay to be seconds-based (instead of an accidentally huge delay on non-Windows).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/test_ssh2.c |
Fixes Windows sleep duration so SSH connect retries wait the intended number of seconds. |
tests/openssh_fixture.c |
Fixes Windows sleep duration and corrects docker-machine IP retry backoff start time to seconds-based delay. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- openssh_fixture: fix overly long retry delay on non-Windows, when acquiring docker machine IP. - test_ssh2: fix overly short retry delay on Windows, on connect. Follow-up to a459a25 libssh2#996 Follow-up to a88a727 Follow-up to 984d008 libssh2#490 Follow-up to cf80f2f Closes libssh2#1853
openssh_fixture: fix overly long retry delay on non-Windows, when
acquiring docker machine IP.
test_ssh2: fix overly short retry delay on Windows, on connect.
Follow-up to a459a25 #996
Follow-up to a88a727
Follow-up to 984d008 #490
Follow-up to cf80f2f