1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-06 20:49:29 +03:00
Files
libssh2/tests
Viktor Szakats 40ac6b230a tests: workaround for intermittent first test failures (#832)
Flakiness got continously worse these last days. It didn't seem related
to recent commits. Flakiness also picked up in GitHub CI runs, something
rarely seen before. Manual restart consistently fixed them.

The repeating pattern was the _first_ test (`test_hostkey`) failing,
with `libssh2_session_handshake failed (-13): Failed getting banner`.
Failures came after a lengthy wait, suggesting a timeout.

I then reversed the order of the first two tests, and it turned out that
the _first_ test failed again (`test_hostkey_hash`). Also pointing to a
timeout issue.

Then I added a dummy test to "warm up" whatever needs warming up in the
layers of CI + Docker + ssh server and their interconnects. This helped,
and GitHub CI tests run without failure right for the first time.
AppVeyor CI also improved a little.

This patch adds a new first test called `test_warmup`, that creates a
new libssh2 session, and exits with success even if that attempt failed.

A stop-gap solution at best, and there is no guarantee it will continue
to fix this or similar future issues, but it's also untenable to have
almost every CI run fail for intermittent reasons.

In some [1] cases [2] it's not the first test failing intermittently.
That's a different issue, and this patch doesn't fix it.

[1] #804
[2] https://ci.appveyor.com/project/libssh2org/libssh2/builds/46440828/job/8rej6cq6itg7vc4w#L500
2023-03-10 00:53:55 +01:00
..
2016-08-14 16:03:25 +01:00
2016-08-14 16:03:25 +01:00
2016-08-14 16:03:25 +01:00
2016-08-14 16:03:25 +01:00
2018-08-02 14:00:25 -07:00
2018-08-02 14:00:25 -07:00
2016-08-14 16:03:25 +01:00
2018-08-02 14:00:25 -07:00
2016-08-14 16:03:25 +01:00
2023-01-06 10:47:32 -08:00
2023-01-06 10:47:32 -08:00
2018-03-13 21:32:41 +00:00
2015-03-12 22:48:38 +00:00
2023-01-06 10:47:32 -08:00