test: Memory tests, deterministic test waits, regenerated DocC docs#26
Open
andrej-jasso wants to merge 3 commits into
Open
test: Memory tests, deterministic test waits, regenerated DocC docs#26andrej-jasso wants to merge 3 commits into
andrej-jasso wants to merge 3 commits into
Conversation
Adds MemoryTests verifying that started reactors, AnyReactor wrappers and their subscriptions deallocate and cancel cleanly. Replaces the shared ManualEventPublisher singleton with a per-instance publisher on ObservableModel so tests no longer couple through global state, and adds a polling waitUntil helper for deterministic asynchronous waits. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rewrites the start-idempotency and debounce tests to poll for the expected state instead of sleeping for fixed durations, and asserts idempotency through synchronously registered subscription counts. Removes flakiness on slow machines while running faster on fast ones. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds the swift-docc-plugin dependency and regenerates the static documentation site in docs/ from the current sources, replacing the 2023 pre-v2 site. Generated with: swift package --allow-writing-to-directory docs generate-documentation \ --target GoodReactor --disable-indexing --transform-for-static-hosting \ --hosting-base-path GoodReactor --output-path docs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
MemoryTestssuite verifying that started reactors,AnyReactorwrappers and their wrapped bases deallocate once the last strong reference is dropped, that subscription tasks are cancelled and subscribers disconnected from publishers on dealloc, and that reactors with in-flightrunevents deallocate after the event finishes. All pass — no leaks found in these scenarios.Task.sleepdelays. They poll for expected state via a newwaitUntilhelper (fails only after a full timeout, passes as soon as the condition holds) and assert idempotency through synchronously registered subscription counts. The sharedManualEventPublishersingleton was replaced with a per-instance publisher onObservableModel, removing cross-test coupling.swift-docc-plugindependency and regenerated the static DocC site indocs/from current sources, replacing the 2023 pre-v2 site (which still documentedGoodCoordinator). The existing README link to GitHub Pages keeps working.Test plan
swift test: 28 tests, 0 failures, verified across repeated runs.🤖 Generated with Claude Code