Tests | Activate SplitPacket Tests #3061
Open
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.
AI Blurp
This pull request includes several improvements and refactorings to the
SplitPacketTest
class and theDataTestUtility
class in the Microsoft.Data.SqlClient test suite. The most important changes include adding new utility methods, refactoring existing methods, and enhancing the test class with proper resource disposal.Improvements and refactorings:
src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.cs
: Added new methodsIsNotNamedInstance
andIsLocalHost
to theDataTestUtility
class for better connection string handling and test conditions.Enhancements to test class:
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/SplitPacketTest/SplitPacketTest.cs
: Refactored theSplitPacketTest
class to use private fields with underscores, addedCancellationToken
support to theSetupProxy
method, and implemented theIDisposable
interface for proper resource cleanup. [1] [2] [3] [4] [5]These changes enhance the code readability, maintainability, and ensure that resources are properly managed during the tests.
Human stuff
This removes the ActiveIssue 5538 from the SplitPacketTest
It makes sure that the test is only run on localhost and without named instances due to the fact that the tests are proxying the requests.
Also added IDisposable cleanup so that the started threads don't hang around.