Repository navigation
[test] Add tests for cmd.shutdownTracingProviderWithTimeout - #14556
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Ambient endpoint configuration and an incomplete timeout assertion can make the test flaky or falsely pass.
1 open finding
What changed in this PR
Adds timeout-path coverage for tracing-provider shutdown using a hanging local OTLP collector.
Changes:
- Adds a hanging collector test.
- Verifies shutdown emits one warning after timing out.
| File | Description |
|---|---|
internal/cmd/tracing_helpers_test.go |
Tests tracing shutdown timeout behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
🔒 mcpg Read-Only Stress — defaultSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE Notes:
|
|
@copilot fix the failing lint ci check https://github.com/github/gh-aw-mcpg/actions/runs/37657800140/job/112917270788?pr=14556 |
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Fixed the gofmt issue in |

Test Coverage Improvement: shutdownTracingProviderWithTimeout
Function Analyzed
internal/cmdshutdownTracingProviderWithTimeoutWhy This Function?
Overall coverage is already high. This was among the few remaining partially covered non-trivial functions, and its shutdown-error branch (warning callback) was never exercised.
Tests Added
warnferror path is verified (exactly one warning, expected message)-shortsince it waits for the 5s timeoutTest Execution
Generated by Test Coverage Improver
Warning
Firewall blocked 4 domains
The following domains were blocked by the firewall during workflow execution:
example.comnonexistent.localslow.example.comthishostdoesnotexist12345.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.