Description
Describe the bug
Our team has narrowed down the reason for our build timeouts to this newer version of SQL Client.
Below are images of tests with timestamps related to this package.
After a second run of the same tests, the time looks so much better. Could there be something being cached?
To reproduce
This is how our test SQL Connections are constructed. We use Selenium for unit testing. Below shows the SqlConnectionStringBuilder:
var sqlConnectionStringBuilder = new SqlConnectionStringBuilder
{
DataSource = ".",
InitialCatalog = nameOfSccServer,
Encrypt = true,
MultipleActiveResultSets = false,
PersistSecurityInfo = false,
TrustServerCertificate = true,
ConnectTimeout = 30
};
Here are more timestamps taken using dotTrace. It's a tool that shows the call stack made during a test run along with time stamps.
Below shows the call DbConnectionPool.TryGetConnection is much slower in the newer package
Expected behavior
The time results from the second run is what would be expected.
Further technical details
Microsoft.Data.SqlClient version: (found on the nuget or Microsoft.Data.SqlClient.dll)
.NET target: net8.0
SQL Server version: SQL Server 15.0.2101.7
Operating system: Windows 11 Pro Version 22H2
Metadata
Assignees
Labels
Type
Projects
Status
Closed