Skip to content

fix: call NotifyEventStored in MCP profiler test#329

Merged
butschster merged 1 commit intomasterfrom
fix/mcp-profiler-test-notify
Apr 9, 2026
Merged

fix: call NotifyEventStored in MCP profiler test#329
butschster merged 1 commit intomasterfrom
fix/mcp-profiler-test-notify

Conversation

@butschster
Copy link
Copy Markdown
Member

What

Adds the missing reg.NotifyEventStored(ev) call in the MCP test's ingestViaHandler helper so profiler-specific tables are populated before MCP tool queries run.

Why

PR #328 moved storeProfile from the profiler handler's Handle() into OnEventStored(). The MCP test bypasses the HTTP server's EventService and calls store.Store() directly, which doesn't trigger module hooks — leaving the profiles and profile_edges tables empty and causing TestMCP_ProfilerEndToEnd to fail in CI.

Testing

go test ./internal/mcp/ -run TestMCP_ProfilerEndToEnd -v passes. Full suite (go test ./...) passes.

After PR #328 moved storeProfile from Handle() to OnEventStored(), the MCP
test's ingestViaHandler helper no longer populated profiler-specific tables.
Add the missing NotifyEventStored call to match the real HTTP server flow.
@butschster butschster added the bug Something isn't working label Apr 9, 2026
@butschster butschster self-assigned this Apr 9, 2026
@butschster butschster merged commit b23975e into master Apr 9, 2026
1 check passed
@butschster butschster deleted the fix/mcp-profiler-test-notify branch April 9, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant