Skip to content

Make SelectionItemContent invalidation test deterministic#236

Merged
Aaronontheweb merged 1 commit into
devfrom
fix/selectionitemcontent-deterministic-test
May 29, 2026
Merged

Make SelectionItemContent invalidation test deterministic#236
Aaronontheweb merged 1 commit into
devfrom
fix/selectionitemcontent-deterministic-test

Conversation

@Aaronontheweb

@Aaronontheweb Aaronontheweb commented May 29, 2026

Copy link
Copy Markdown
Owner

What changed

  • Reworked SelectionItemContentTests.Invalidated_EmitsOnAnimationChange to use FakeTimeProvider instead of real time.
  • Subscribes to Invalidated, advances fake time by spinner interval, and asserts deterministic invalidation counts.
  • Removed wall-clock WaitAsync timeout dependency.

Why

  • CI failed on macOS due to nondeterministic timer scheduling for the real-time spinner test.
  • This makes the test deterministic and aligned with repository testing guidelines.

Verification

  • dotnet test tests/Termina.Tests/Termina.Tests.csproj -c Release --filter FullyQualifiedName~Termina.Tests.Layout.SelectionItemContentTests.Invalidated_EmitsOnAnimationChange
  • dotnet test tests/Termina.Tests/Termina.Tests.csproj -c Release --filter FullyQualifiedName~Termina.Tests.Layout.SelectionItemContentTests

@Aaronontheweb Aaronontheweb merged commit 897577b into dev May 29, 2026
8 checks passed
@Aaronontheweb Aaronontheweb deleted the fix/selectionitemcontent-deterministic-test branch May 29, 2026 15:17
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.

1 participant