Skip to content

Refs #159: migrate TaskScheduler.Integration.Tests to MSTest assertions (Phase 7)#177

Merged
blehnen merged 1 commit into
masterfrom
phase-7-taskscheduler-tests
Jul 4, 2026
Merged

Refs #159: migrate TaskScheduler.Integration.Tests to MSTest assertions (Phase 7)#177
blehnen merged 1 commit into
masterfrom
phase-7-taskscheduler-tests

Conversation

@blehnen

@blehnen blehnen commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Migrates DotNetWorkQueue.TaskScheduling.Distributed.TaskScheduler.Integration.Tests off FluentAssertions to built-in MSTest assertions. Part of #159. Test-only — no production assemblies, no version bump.

Scope

  • 3 files / 8 .Should() sites (NodeDiscoveryTests, EndToEndSchedulingTests, ConcurrencyRegressionTests) → Assert.*.
  • Each FA because message preserved as the MSTest message argument (Assert.IsTrue(x, msg), IsNotNull(x, msg), AreEqual(e, a, msg)).
  • Removed the FluentAssertions PackageReference. No Tests.Shared reference needed (no non-1:1 patterns).
  • Source/Directory.Packages.props untouched (final cleanup is a later PR).

Verification

  • Release build (net10.0, TreatWarningsAsErrors): 0 warnings / 0 errors.
  • Project-wide grep: 0 FluentAssertions / using FluentAssertions / .Should().
  • Local dotnet test: 4/4 passed (net10.0). Also validated on the dedicated Jenkins TaskScheduler stage.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

    • Updated integration tests to use standard assertion APIs consistently.
    • Preserved existing concurrency, end-to-end, and node-discovery coverage while keeping the same validation behavior.
  • Chores

    • Removed an unused test-only dependency from the integration test project.

…assertions

Replace all 8 FluentAssertions .Should() sites across 3 files (NodeDiscovery,
EndToEndScheduling, ConcurrencyRegression) with MSTest assertions, preserving each
FA because-message as the MSTest message arg. Remove FluentAssertions PackageReference.
Directory.Packages.props untouched (Phase 8).

Refs #159

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 23263e7d-28ce-4c37-8871-625dda8037e3

📥 Commits

Reviewing files that changed from the base of the PR and between f0dc20f and eb23afd.

📒 Files selected for processing (4)
  • Source/DotNetWorkQueue.TaskScheduling.Distributed.TaskScheduler.Integration.Tests/ConcurrencyRegressionTests.cs
  • Source/DotNetWorkQueue.TaskScheduling.Distributed.TaskScheduler.Integration.Tests/DotNetWorkQueue.TaskScheduling.Distributed.TaskScheduler.Integration.Tests.csproj
  • Source/DotNetWorkQueue.TaskScheduling.Distributed.TaskScheduler.Integration.Tests/EndToEndSchedulingTests.cs
  • Source/DotNetWorkQueue.TaskScheduling.Distributed.TaskScheduler.Integration.Tests/NodeDiscoveryTests.cs
💤 Files with no reviewable changes (1)
  • Source/DotNetWorkQueue.TaskScheduling.Distributed.TaskScheduler.Integration.Tests/DotNetWorkQueue.TaskScheduling.Distributed.TaskScheduler.Integration.Tests.csproj

📝 Walkthrough

Walkthrough

FluentAssertions is removed from the TaskScheduling.Distributed.TaskScheduler integration test project. Its NuGet package reference is dropped, and Should()-style assertions across four test files are replaced with equivalent MSTest Assert.IsTrue, Assert.IsNotNull, and Assert.AreEqual calls.

Changes

FluentAssertions to MSTest Migration

Layer / File(s) Summary
Project dependency removal
Source/.../DotNetWorkQueue.TaskScheduling.Distributed.TaskScheduler.Integration.Tests.csproj
The FluentAssertions PackageReference is removed from the test project.
Concurrency regression test assertions
Source/.../ConcurrencyRegressionTests.cs
Removes the FluentAssertions import and replaces the final task-count assertion with Assert.AreEqual.
End-to-end scheduling test assertions
Source/.../EndToEndSchedulingTests.cs
Removes the FluentAssertions import and replaces null checks on queue/queue.Configuration with Assert.IsNotNull.
Node discovery test assertions
Source/.../NodeDiscoveryTests.cs
Removes the FluentAssertions import and replaces multiple boolean checks (signal firing, remote count thresholds, decay comparison) across two test methods with Assert.IsTrue.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

Possibly related PRs

Poem

A rabbit hopped through lines of test,
Swapped Should() for Assert, did its best,
No more Fluent, just MSTest clean,
The cleanest suite you've ever seen,
Thump thump — green checks, nothing less! 🐇✅

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: migrating TaskScheduler.Integration.Tests from FluentAssertions to MSTest assertions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Jul 4, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.45%. Comparing base (06adc91) to head (eb23afd).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #177      +/-   ##
==========================================
+ Coverage   87.32%   87.45%   +0.12%     
==========================================
  Files        1024     1024              
  Lines       33905    33905              
  Branches     2870     2870              
==========================================
+ Hits        29609    29652      +43     
+ Misses       3407     3374      -33     
+ Partials      889      879      -10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blehnen blehnen merged commit b80eda8 into master Jul 4, 2026
6 checks passed
@blehnen blehnen deleted the phase-7-taskscheduler-tests branch July 4, 2026 23:50
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