Skip to content

feat(testkit): tool-list-changed assertion helper (MC-47) - #32

Merged
jgangemi merged 1 commit into
mainfrom
jae/mc47-listchanged-helper
Jul 12, 2026
Merged

jgangemi merged 1 commit into
mainfrom
jae/mc47-listchanged-helper

Conversation

@jgangemi

Copy link
Copy Markdown
Member
  • wire mcpx.ClientOptions.OnToolListChanged into testkit.Harness at New(),
    signaling a buffered non-blocking channel on each notification
  • add Harness.WaitForToolListChanged(timeout) bool: waits for at least one
    notifications/tools/list_changed within timeout, false on timeout
  • add AssertToolListChanged(t, h, timeout) test-failing wrapper, matching
    AssertToolSet/EventuallyContains' t-taking style
  • refactor MC-45's TestLockBeforeConnectThenUnlockAtRuntime to use
    testkit.Harness + the new helper instead of a hand-built raw mcpx.Client
  • add TestHarnessToolListChanged_Timeout and _Signaled covering both
    WaitForToolListChanged branches directly in the testkit package

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

@jgangemi
jgangemi enabled auto-merge (squash) July 12, 2026 21:17
@coveralls

coveralls commented Jul 12, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 29209544104

Coverage increased (+0.05%) to 96.284%

Details

  • Coverage increased (+0.05%) from the base build.
  • Patch coverage: 22 of 22 lines across 2 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1534
Covered Lines: 1477
Line Coverage: 96.28%
Coverage Strength: 1.11 hits per line

💛 - Coveralls

- wire mcpx.ClientOptions.OnToolListChanged into testkit.Harness at New(),
  signaling a buffered non-blocking channel on each notification
- add Harness.WaitForToolListChanged(timeout) bool: waits for at least one
  notifications/tools/list_changed within timeout, false on timeout
- add AssertToolListChanged(t, h, timeout) test-failing wrapper, matching
  AssertToolSet/EventuallyContains' t-taking style
- refactor MC-45's TestLockBeforeConnectThenUnlockAtRuntime to use
  testkit.Harness + the new helper instead of a hand-built raw mcpx.Client
- add TestHarnessToolListChanged_Timeout and _Signaled covering both
  WaitForToolListChanged branches directly in the testkit package

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jgangemi
jgangemi force-pushed the jae/mc47-listchanged-helper branch from fbccbf5 to 71c815e Compare July 12, 2026 21:23
@jgangemi
jgangemi merged commit a00fe50 into main Jul 12, 2026
4 checks passed
@jgangemi
jgangemi deleted the jae/mc47-listchanged-helper branch July 12, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants