Skip to content

Fix test 19 - #56

Merged
titsuki merged 1 commit into
masterfrom
fix-test19-mac-osx
Jun 27, 2026
Merged

Fix test 19#56
titsuki merged 1 commit into
masterfrom
fix-test19-mac-osx

Conversation

@titsuki

@titsuki titsuki commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Fix flaky t/19 spawn race on macOS

t/19-gnuplot-bin.t removed the fake gnuplot script with $fake.IO.unlink immediately after constructing the chart. Since Proc::Async starts the subprocess asynchronously, the unlink could win the race against the actual exec. On macOS (where $*TMPDIR lives under /var/folders/...) this surfaced as:

Failed to spawn process .../fake-gnuplot-...: no such file or directory
and, because the rejected start promise was never awaited, it leaked out as an Unhandled exception in code scheduled on thread N that bled into other tests' output.

Fix: call $gnu.dispose before unlinking. dispose awaits the subprocess promise, so the binary is guaranteed to have been exec'd before the file is removed. Test-only change; the library itself is unaffected in normal usage with a real gnuplot.

@titsuki
titsuki merged commit 3d17a65 into master Jun 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant