Skip to content

Fix missing using directives in DiagnosticTest.cs#4079

Merged
cheenamalhotra merged 2 commits intodev/cheena/fix-diagnostic-testsfrom
copilot/sub-pr-4078
Mar 24, 2026
Merged

Fix missing using directives in DiagnosticTest.cs#4079
cheenamalhotra merged 2 commits intodev/cheena/fix-diagnostic-testsfrom
copilot/sub-pr-4078

Conversation

Copy link
Contributor

Copilot AI commented Mar 24, 2026

Description

Restores required using directives to DiagnosticTest.cs that were inadvertently removed in #4078, causing compilation failures across all TFMs (particularly net462, where implicit/global usings are not available).

Restored namespaces:

  • SystemEnvironment, Console, Guid, Func
  • System.Threading.TasksTask<T> for async stdout/stderr reads
  • Xunit / Xunit.AbstractionsAssert, ConditionalFact, ITestOutputHelper
  • Microsoft.DotNet.RemoteExecutorRemoteExecutor, RemoteInvokeOptions, RemoteInvokeHandle
  • Microsoft.SqlServer.TDSTDSMessage, TDSMessageCollection, TDSMessageType
  • Microsoft.SqlServer.TDS.DoneTDSDoneToken, TDSDoneTokenStatusType, TDSDoneTokenCommandType
  • Microsoft.SqlServer.TDS.EndPointITDSServerSession
  • Microsoft.SqlServer.TDS.ErrorTDSErrorToken
  • Microsoft.SqlServer.TDS.SQLBatchTDSSQLBatchToken
  • Microsoft.SqlServer.TDS.ServersTdsServer, TdsServerArguments, QueryEngine

Issues

Addresses review feedback on #4078: #4078 (comment)

Testing

No logic changes — compilation fix only. The diagnostic tests themselves remain unchanged. Build validation across net462, net8.0, and net9.0 confirms the file compiles correctly with all TFMs.

Guidelines

Please review the contribution guidelines before submitting a pull request:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: cheenamalhotra <13396919+cheenamalhotra@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/SqlClient/sessions/244c9288-ae91-4b54-8cd6-0837024e8792
Copilot AI changed the title [WIP] [WIP] Address feedback on diagnostic tests and remote executor fixes Fix missing using directives in DiagnosticTest.cs Mar 24, 2026
Copilot AI requested a review from cheenamalhotra March 24, 2026 07:13
@cheenamalhotra cheenamalhotra marked this pull request as ready for review March 24, 2026 07:13
@cheenamalhotra cheenamalhotra requested a review from a team as a code owner March 24, 2026 07:13
Copilot AI review requested due to automatic review settings March 24, 2026 07:13
@cheenamalhotra cheenamalhotra merged commit cc47b9d into dev/cheena/fix-diagnostic-tests Mar 24, 2026
1 check passed
@cheenamalhotra cheenamalhotra deleted the copilot/sub-pr-4078 branch March 24, 2026 07:14
@github-project-automation github-project-automation bot moved this from To triage to Done in SqlClient Board Mar 24, 2026
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

Restores missing using directives in the manual diagnostics test file so it compiles again across all target frameworks (including net462, where implicit/global usings aren’t available).

Changes:

  • Re-adds System and System.Threading.Tasks usings needed for types like Environment, Func<>, and Task<>.
  • Re-adds required test/framework and TDS server usings (Xunit*, Microsoft.DotNet.RemoteExecutor, Microsoft.SqlServer.TDS*) referenced throughout the file.

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants