Add Logging test package and CI coverage#4384
Draft
paulmedynski wants to merge 1 commit into
Draft
Conversation
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.
Contributor
There was a problem hiding this comment.
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.Testproject (xUnit) with central package versioning via an importedDirectory.Packages.props. - Adds a
TestLoggingtarget tobuild.projand includes it in the aggregateTesttarget. - Extends the CI stage for Logging to run tests on Linux/Windows/macOS via a new
test-logging-package-ci-job.ymltemplate.
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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
Microsoft.Data.SqlClient.Internal.Loggingtest project and wires it into the build and CI.What's included
Logging/test/project (Logging.Test.csproj,Directory.Packages.props,SqlClientEventSourceTest.cs).TestLoggingbuild target + project path inbuild.proj.test-logging-package-ci-job.yml; Logging package CI stage wired for signed internal builds..slnx) entry for the test project.🔗 PR Stack
Part of a 5-PR stack — current PR marked 👉. Indentation shows the branch base.
mainSTRONG_NAME_SIGNING→ASSEMBLY_SIGNINGMicrosoft.SqlServer.Serverassembly & CIflowchart 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;Checklist