Skip to content

Fix spec for trap_thread_dump_signal#1896

Open
eregon wants to merge 1 commit into
cucumber:mainfrom
eregon:fix-trap_thread_dump_signal-spec
Open

Fix spec for trap_thread_dump_signal#1896
eregon wants to merge 1 commit into
cucumber:mainfrom
eregon:fix-trap_thread_dump_signal-spec

Conversation

@eregon

@eregon eregon commented Jul 21, 2026

Copy link
Copy Markdown

Description

Locally I added a 1000.times { ... } around to spec and that way I could repro the failure locally (100 was not enough).
Before the fix it failed reliably a few times, after it passes reliably.

Type of change

Please delete options that are not relevant.

  • spec fix

Checklist:

Your PR is ready for review once the following checklist is
complete. You can also add some checks if you want to.

  • Tests have been added for any changes to behaviour of the code
  • New and existing tests are passing locally and on CI
  • bundle exec rubocop reports no offenses
  • RDoc comments have been updated
  • CHANGELOG.md has been updated (not user-facing so no entry)

@luke-hill

Copy link
Copy Markdown
Contributor

@eregon think there's a JRuby error hre

@eregon

eregon commented Jul 24, 2026

Copy link
Copy Markdown
Author

Ah yes because JRuby runs the handler on a non-main Thread, I'll adjust the pattern for that.

* The spec was timing-dependant and therefore flaky.
* Use a common pattern guaranteed to match.
* Always wait for the signal since Process.kill can be asynchronous (and in real cases always is).
* See truffleruby/truffleruby#4383 (comment)
@eregon
eregon force-pushed the fix-trap_thread_dump_signal-spec branch from 8412bd8 to 2795005 Compare July 24, 2026 21:05
@eregon

eregon commented Jul 24, 2026

Copy link
Copy Markdown
Author

@luke-hill Done, please start the CI and take another look.
I ran the spec locally on JRuby and it passed now.

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.

2 participants