Commit 55eb07a
committed
test(logs): avoid t.TempDir cleanup race on Windows for open log handle
The lumberjack writer keeps the per-server log file open for the
logger's lifetime, and Windows cannot remove an open file. t.TempDir's
cleanup asserts RemoveAll succeeds, failing the Cross-Platform Logging
Tests job on windows-latest. Switch to os.MkdirTemp with a best-effort
cleanup (mirroring TestE2E_LogRotation) and stop asserting on Sync().
Related #5981 parent 088e41b commit 55eb07a
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
| |||
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
56 | | - | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
| |||
0 commit comments