Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
os: [ ubuntu-latest, macos-latest ]
include:
- os: windows-latest
ruby: 2.6
- os: windows-latest
ruby: 3.4
exclude:
- os: macos-latest
ruby: truffleruby
Expand Down
8 changes: 5 additions & 3 deletions test/test_timeout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,9 @@ def test_timeout_in_trap_handler

rd, wr = IO.pipe

trap("SIGUSR1") do
signal = Signal.list["USR1"] ? :USR1 : :TERM

trap(signal) do
begin
Timeout.timeout(0.1) do
sleep 1
Expand All @@ -440,9 +442,9 @@ def test_timeout_in_trap_handler
end
end

Process.kill :USR1, Process.pid
Process.kill signal, Process.pid

assert_equal "OK", rd.read
rd.close
end if Signal.list["USR1"] # Windows has no SIGUSR1
end
end