Skip to content

Add Logging test package and CI coverage#4384

Draft
paulmedynski wants to merge 1 commit into
dev/paul/assembly-signing-renamefrom
dev/paul/logging-test-package
Draft

Add Logging test package and CI coverage#4384
paulmedynski wants to merge 1 commit into
dev/paul/assembly-signing-renamefrom
dev/paul/logging-test-package

Conversation

@paulmedynski

@paulmedynski paulmedynski commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the Microsoft.Data.SqlClient.Internal.Logging test project and wires it into the build and CI.

What's included

  • New Logging/test/ project (Logging.Test.csproj, Directory.Packages.props, SqlClientEventSourceTest.cs).
  • TestLogging build target + project path in build.proj.
  • New test-logging-package-ci-job.yml; Logging package CI stage wired for signed internal builds.
  • Solution (.slnx) entry for the test project.

🔗 PR Stack

Part of a 5-PR stack — current PR marked 👉. Indentation shows the branch base.

  • 🏗️ #4382 — Sign CI Package pipeline assemblies & tests · base: main
    • 🏷️ #4383 — Rename STRONG_NAME_SIGNINGASSEMBLY_SIGNING
      • 🪵 👉 #4384 — Add Logging test package & CI
      • ☁️ #4385 — Sign Azure extension assembly & tests
      • 🧩 #4386 — Sign Microsoft.SqlServer.Server assembly & CI
flowchart TD
    main([main])
    PR1["🏗️ #4382<br/>signing-core"]
    PR2["🏷️ #4383<br/>rename"]
    PR3["🪵 #4384<br/>logging-tests"]
    PR4["☁️ #4385<br/>azure-signing"]
    PR5["🧩 #4386<br/>sqlserver.server"]
    main --> PR1 --> PR2
    PR2 --> PR3
    PR2 --> PR4
    PR2 --> PR5
    click PR1 "https://github.com/dotnet/SqlClient/pull/4382" _blank
    click PR2 "https://github.com/dotnet/SqlClient/pull/4383" _blank
    click PR3 "https://github.com/dotnet/SqlClient/pull/4384" _blank
    click PR4 "https://github.com/dotnet/SqlClient/pull/4385" _blank
    click PR5 "https://github.com/dotnet/SqlClient/pull/4386" _blank
    classDef current fill:#1f6feb,stroke:#1f6feb,color:#fff;
    class PR3 current;
Loading

Only this PR touches build.proj. Each of PR3/PR4/PR5 edits a different stage hunk in dotnet-sqlclient-ci-core.yml; whichever merges first, the others need a trivial rebase.

Checklist

  • Tests added (Logging: 2/2)
  • Public API changes documented (none)
  • No breaking changes

Add the Microsoft.Data.SqlClient.Internal.Logging test project with its
SqlClientEventSource tests, the TestLogging build target and project path, the
test-logging CI job, the solution entry, and the signed-IVT/test signing setup
for the Logging project. Wire the Logging package stage for signed internal
builds.
Copilot AI review requested due to automatic review settings June 19, 2026 16:28
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Jun 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class test coverage for the internal Logging package and wires those tests into the repo’s build orchestration and CI pipeline stages/jobs.

Changes:

  • Introduces a new Microsoft.Data.SqlClient.Internal.Logging.Test project (xUnit) with central package versioning via an imported Directory.Packages.props.
  • Adds a TestLogging target to build.proj and includes it in the aggregate Test target.
  • Extends the CI stage for Logging to run tests on Linux/Windows/macOS via a new test-logging-package-ci-job.yml template.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Microsoft.Data.SqlClient.slnx Adds the new Logging test project to the solution.
src/Microsoft.Data.SqlClient.Internal/Logging/test/SqlClientEventSourceTest.cs New basic singleton tests for SqlClientEventSource.Log.
src/Microsoft.Data.SqlClient.Internal/Logging/test/Logging.Test.csproj New multi-targeted test project (net8/net9/net10 + net462 on Windows) with optional test-key signing.
src/Microsoft.Data.SqlClient.Internal/Logging/test/Directory.Packages.props Imports shared test dependency versions from SqlClient tests’ CPM file.
src/Microsoft.Data.SqlClient.Internal/Logging/src/Logging.csproj Adds IVT handling for signed/package-mode test assemblies.
eng/pipelines/stages/build-logging-package-ci-stage.yml Adds OS test jobs for Logging and threads internal/signing + reference type parameters through.
eng/pipelines/jobs/test-logging-package-ci-job.yml New job template to build and run Logging tests across target frameworks and OSes.
eng/pipelines/jobs/pack-logging-package-ci-job.yml Threads internal signing/reference-type parameters into pack job behavior.
eng/pipelines/dotnet-sqlclient-ci-core.yml Passes isInternalBuild and referenceType into the Logging stage template.
build.proj Adds LoggingTestProjectPath, TestLogging target, and wires it into the aggregate Test target.

Comment on lines +7 to +20
public class SqlClientEventSourceTest
{
[Fact]
public void SqlClientEventSource_Log_IsNotNull()
{
Assert.NotNull(SqlClientEventSource.Log);
}

[Fact]
public void SqlClientEventSource_Log_IsSingleton()
{
Assert.Same(SqlClientEventSource.Log, SqlClientEventSource.Log);
}
}
Comment on lines 149 to +158
@@ -93,3 +154,5 @@ stages:
buildConfiguration: ${{ parameters.buildConfiguration }}
debug: ${{ parameters.debug }}
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
isInternalBuild: ${{ parameters.isInternalBuild }}
referenceType: ${{ parameters.referenceType }}
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (dev/paul/assembly-signing-rename@c5532b2). Learn more about missing BASE report.

Additional details and impacted files
@@                         Coverage Diff                         @@
##             dev/paul/assembly-signing-rename    #4384   +/-   ##
===================================================================
  Coverage                                    ?   63.48%           
===================================================================
  Files                                       ?      280           
  Lines                                       ?    66257           
  Branches                                    ?        0           
===================================================================
  Hits                                        ?    42064           
  Misses                                      ?    24193           
  Partials                                    ?        0           
Flag Coverage Δ
PR-SqlClient-Project 63.48% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To triage

Development

Successfully merging this pull request may close these issues.

2 participants