Commit 0a3010f
Fix Windows separator mismatch in SlotLockTest
testLogicalLockReportsLockDirectoryCreationFailure built the lock
directory path with Paths.get(parentDir, ".slot-locks"), which yields a
backslash separator on Windows. SlotLock.acquireLogical builds it as
parentDir + "/" + ".slot-locks" (forward slash), so the injected
LockDirectoryFailureFacade -- which fails mkdir only when
lockDir.equals(path) -- never matched the production path on Windows.
The mkdir then succeeded, acquireLogical did not throw, and the test hit
its fail() guard. It passed on Linux and macOS only because Paths.get
uses a forward slash there.
Build the test's lock-dir (and slot) path with the same "/"
concatenation SlotLock uses, so the facade matches on every platform.
Test-only change; no production behavior is affected.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 75d89b8 commit 0a3010f
1 file changed
Lines changed: 8 additions & 2 deletions
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
149 | 155 | | |
150 | 156 | | |
151 | 157 | | |
| |||
0 commit comments