Skip to content

Conversation

@JacksonWeber
Copy link
Contributor

@JacksonWeber JacksonWeber commented May 22, 2025

Expanded test coverage for the AppInsights v3 library.

@JacksonWeber JacksonWeber requested a review from Copilot May 22, 2025 01:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves overall test coverage for shim components, adds extensive file system helper tests, and corrects a typo in the ETW writer class name.

  • Expanded TelemetryClient tests to exercise unsupported methods and error logging
  • Added comprehensive tests for CorrelationContextManager context scenarios and fileSystemHelper operations
  • Renamed EtwWritter to EtwWriter and updated its usage in the diagnostic logger

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/unitTests/shim/telemetryClient.tests.ts Added tests for unsupported/deprecated APIs and error handling in trackMetric
test/unitTests/shim/correlationContextManger.tests.ts Expanded tests for context conversion, binding, and error handling in various manager methods
test/unitTests/shared/util.tests.ts Introduced tests for fileSystemHelper covering directory/file ops and promisified fs methods
src/agent/diagnostics/writers/etwWriter.ts Corrected class name from EtwWritter to EtwWriter
src/agent/diagnostics/etwDiagnosticLogger.ts Updated import and instantiation to reference the renamed EtwWriter
Comments suppressed due to low confidence (2)

test/unitTests/shim/telemetryClient.tests.ts:181

  • Tests for trackException and trackTrace methods are missing; add cases to cover these code paths and ensure full coverage of the manual track APIs.
describe("#manual track APIs", () => {

src/agent/diagnostics/writers/etwWriter.ts:9

  • [nitpick] Consider adding unit tests for EtwWriter (and its integration via EtwDiagnosticLogger) to verify that logging methods invoke the underlying ETW module correctly and handle errors as expected.
export class EtwWriter implements IAgentLogger {

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@JacksonWeber JacksonWeber merged commit cc9655d into microsoft:main May 23, 2025
4 checks passed
@JacksonWeber JacksonWeber mentioned this pull request Jul 25, 2025
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.

2 participants