Skip to content

chore: Stop the data source in fdv1 specs that start a real processor - #455

Merged
jsonbailey merged 1 commit into
mainfrom
jb/fdv1-spec-stream-leak
Sep 29, 2026
Merged

jsonbailey merged 1 commit into
mainfrom
jb/fdv1-spec-stream-leak

Conversation

@jsonbailey

@jsonbailey jsonbailey commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Several fdv1 specs start a real stream or polling processor and never stop it. The leaked SSE thread later hits a 401 and calls an expired RSpec double, which shows up as a thread warning in CI. Add an after hook that stops the data source in the two describe blocks that start real processors.


Note

Overview
Fixes flaky CI thread warnings by teardown in fdv1_spec.rb: an after { subject.stop } hook was added to the #start and diagnostic accumulator integration describe blocks.

Those examples call subject.start with real StreamProcessor / PollingProcessor instances, which left background SSE threads running after the example finished. Those threads could later get a 401 and touch expired RSpec doubles. Stopping the data source after each example keeps processor threads from outliving the test.

Reviewed by Cursor Bugbot for commit 14d5404. Bugbot is set up for automated code reviews on this repo. Configure here.

@jsonbailey
jsonbailey requested a review from a team as a code owner September 29, 2026 20:36
@jsonbailey
jsonbailey merged commit bc6a166 into main Sep 29, 2026
12 checks passed
@jsonbailey
jsonbailey deleted the jb/fdv1-spec-stream-leak branch September 29, 2026 22:42
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