Commit b9602f3
committed
t/t-credentials: avoid failing flakily when run in parallel
We've noticed that this test has become flaky sometimes and fails in CI.
More recently, a distributor noticed that this test fails consistently
when run with 4 jobs at a time with `prove`. Not all of the tests fail
every time, but at least one of them does.
Part of the relevant difference is that our netrc tests use `localhost`
as the machine name instead of the default 127.0.0.1. This is helpful,
because it means we don't call the credential helper, when we really
want to fall back to the askpass code. That's because we use different
credentials for the `netrctest` remote, so if there were credentials
available for `localhost`, we'll fail since we'll provide the wrong
ones.
The reason, therefore, that this test is flaky is that the clone code
creates an entry for the credential helper for `localhost`, and the
credential directory is shared among tests. Thus, `t-credentials.sh`
fails whenever these tests run concurrently.
The obvious solution is to simply create a per-test credentials
directory so that we aren't affected by what other tests are doing.
Let's do that, which makes this test pass consistently.1 parent b326b63 commit b9602f3
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
0 commit comments