[Repo Assist] test: add SideEffects module to TaskSeq.Using.Tests.fs#414
Draft
github-actions[bot] wants to merge 2 commits intomainfrom
Draft
[Repo Assist] test: add SideEffects module to TaskSeq.Using.Tests.fs#414github-actions[bot] wants to merge 2 commits intomainfrom
github-actions[bot] wants to merge 2 commits intomainfrom
Conversation
Add 7 new tests in a SideEffects module that verify disposal semantics for the use and use! CE bindings: - Dispose/DisposeAsync called exactly once per full iteration - Dispose/DisposeAsync called on each re-iteration (3×) - Dispose called on early termination via TaskSeq.take - Multiple use bindings each trigger their own Dispose - Each re-iteration creates and disposes a fresh resource Two new helper types (CountingDisposable, CountingAsyncDisposable) make it easy to assert exact call counts without the bool-ref pattern used by the existing tests. All 5258 tests pass (Release, net10.0). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
24 tasks
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.
🤖 This is an automated pull request from Repo Assist, an AI assistant.
Summary
Adds a
SideEffectsmodule toTaskSeq.Using.Tests.fswith 7 new tests that verifyDispose/DisposeAsynccall-count semantics for theuseanduse!CE bindings.The existing tests (6 tests) only check that the disposed flag is set after a single iteration. The new tests cover:
use— Dispose called exactly once per full iterationuse— Dispose called on each re-iterationuse!— DisposeAsync called exactly once per full iterationuse!— DisposeAsync called on each re-iterationuse— Dispose called on early termination viatakeuse— multipleusebindings each get their ownDisposeuse— each re-iteration creates and disposes a fresh resourceGetAsyncEnumeratorcallTwo small helper types are added at module level:
CountingDisposable— increments anint refinDisposeCountingAsyncDisposable— increments anint refinDisposeAsyncThese make exact call-count assertions straightforward without the
bool refpattern used by the existing tests.Test Status
✅ All 5258 tests pass (
Release,net10.0).