Commit 8e23550
authored
Fix flaky repos integration tests (#2834)
## Why
We often see repos integration tests fail with object already exists
errors. One hypothesis is that the Random string generator is not truly
random and pulls from a small seed pool in CI. This PR attempts to fix
that hypothetical issue by using UUIDs instead to generate the random
string.
Example failure:
```
=== FAIL: integration/cmd/repos TestReposGet (3.83s)
repos_test.go:80: CLOUD_ENV=***
repos_test.go:47:
Error Trace: C:/a/eng-dev-ecosystem/eng-dev-ecosystem/ext/cli/integration/cmd/repos/repos_test.go:47
C:/a/eng-dev-ecosystem/eng-dev-ecosystem/ext/cli/integration/cmd/repos/repos_test.go:83
Error: Received unexpected error:
a Workspace object at path /Repos/***/empty-repo-integration-pIdzKaCkfhBq already exists. Try a different path for your Repo or rename the existing Workspace object.
Request ID: 2a601c0f-75d2-4568-a7ac-7fc8a3423932
Test: TestReposGet
```1 parent f686d89 commit 8e23550
1 file changed
Lines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
| 8 | + | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
23 | | - | |
24 | 21 | | |
25 | 22 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
33 | 26 | | |
34 | | - | |
| 27 | + | |
| 28 | + | |
35 | 29 | | |
36 | 30 | | |
37 | 31 | | |
| |||
0 commit comments