Commit aaae417
fix(test): prevent flaky tarball test race condition (#1982)
## Summary
The `createTarball` success test writes `output.tar.gz` into the same
temp directory being archived. `tar` sees the file appear while reading
the directory and exits with code 1 ("file changed as we read it"),
causing intermittent CI failures on any PR that rebases onto main.
Fix: write output to a separate temp directory.
## Test plan
- [x] 10/10 debug tests pass
- [x] Race condition eliminated — output dir is separate from source dir
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Tests**
* Improved test isolation by writing generated test artifacts to a
separate temporary output directory instead of the archived source
directory.
* Enhanced cleanup to remove the separate output directory (recursive)
after each test, ensuring no leftover artifacts remain.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent f7a3c33 commit aaae417
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
81 | 86 | | |
82 | 87 | | |
83 | 88 | | |
| |||
0 commit comments