{{ message }}
Repository navigation
Add tests for Sidekiq::Process signal pushing and status helpers - #7031
Merged
Merged
Conversation
Four cohesive tests for Process's signal/status API — the contract
behind the Web UI's per-process Quiet/Stop/Dump Threads buttons:
- quiet! pushes 'TSTP' onto the <identity>-signals list with a 60s
TTL (the contract that lets the running process pick up the signal
without ever growing the list).
- stop! pushes 'TERM' and dump_threads pushes 'TTIN' onto the same
per-identity signals list.
- stopping? reflects the 'quiet' attribute in the process info hash
('true' string -> true, anything else -> false).
- leader? compares the process identity to the dear-leader Redis key
(returns true only when the identity matches).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Four cohesive tests for
Sidekiq::Process's signal/status API — the contract behind the Web UI's per-process Quiet/Stop/Dump Threads buttons. The existing test forquiet!/stop!only asserts they raise on embedded processes; the actual signal-pushing side effect was never verified.quiet!pushesTSTPonto the<identity>-signalslist with a 60s TTL (the contract that lets the running process pick up the signal without the list ever growing).stop!+dump_threadspushTERMandTTINonto the same per-identity signals list (and we confirmlpushordering newest-first).stopping?reflects thequietattribute in the process info hash ("true"string → true, anything else → false).leader?compares the process identity to thedear-leaderRedis key — true only when the identity matches.Test-only, no
lib/changes.Testing
bundle exec rakeis green (standard + lint:herb + full suite).