Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix | Fix driver to not send expired token and refresh token first before sending it. #2273

Merged
merged 15 commits into from
Jan 24, 2024

Apply suggestions from code review

0950949
Select commit
Loading
Failed to load commit list.
Merged

Fix | Fix driver to not send expired token and refresh token first before sending it. #2273

Apply suggestions from code review
0950949
Select commit
Loading
Failed to load commit list.
Azure Pipelines / CI-SqlClient failed Jan 25, 2024 in 7h 29m 16s

Build #02408 had test failures

Details

Tests

  • Failed: 4 (0.00%)
  • Passed: 347,836 (98.44%)
  • Other: 5,492 (1.55%)
  • Total: 353,332
Code coverage

  • 27304 of 38578 lines covered (70.78%)

Annotations

Check failure on line 37 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / CI-SqlClient

Build log #L37

Git fetch failed with exit code: 128

Check failure on line 37 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / CI-SqlClient

Build log #L37

Git fetch failed with exit code: 128

Check failure on line 37 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / CI-SqlClient

Build log #L37

Git fetch failed with exit code: 128

Check failure on line 0 in EXEC

See this annotation in the file changed.

@azure-pipelines azure-pipelines / CI-SqlClient

EXEC#L0

EXEC(0,0): Error Message: 

Check failure on line 1 in Microsoft.Data.SqlClient.Tests.SqlConnectionBasicTests.TransientFaultDisabledTest(errorCode: 40613)

See this annotation in the file changed.

@azure-pipelines azure-pipelines / CI-SqlClient

Microsoft.Data.SqlClient.Tests.SqlConnectionBasicTests.TransientFaultDisabledTest(errorCode: 40613)

Assert.Throws() Failure: No exception was thrown
Expected: typeof(Microsoft.Data.SqlClient.SqlException)
Raw output
   at Microsoft.Data.SqlClient.Tests.SqlConnectionBasicTests.TransientFaultDisabledTest(UInt32 errorCode) in /_/src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlConnectionBasicTests.cs:line 146

Check failure on line 1 in Microsoft.Data.SqlClient.ManualTesting.Tests.InstanceNameTest.ConnectManagedWithInstanceNameTest(useMultiSubnetFailover: True, ipPreference: UsePlatformDefault)

See this annotation in the file changed.

@azure-pipelines azure-pipelines / CI-SqlClient

Microsoft.Data.SqlClient.ManualTesting.Tests.InstanceNameTest.ConnectManagedWithInstanceNameTest(useMultiSubnetFailover: True, ipPreference: UsePlatformDefault)

Assert.Throws() Failure: Exception type was not an exact match
Expected: typeof(Microsoft.Data.SqlClient.SqlException)
Actual:   typeof(System.OperationCanceledException)
---- System.OperationCanceledException : The operation was canceled.
Raw output
   at Microsoft.Data.SqlClient.ManualTesting.Tests.InstanceNameTest.ConnectManagedWithInstanceNameTest(Boolean useMultiSubnetFailover, SqlConnectionIPAddressPreference ipPreference) in /_/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/InstanceNameTest/InstanceNameTest.cs:line 82
   at InvokeStub_InstanceNameTest.ConnectManagedWithInstanceNameTest(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
----- Inner Stack Trace -----
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at System.Threading.ManualResetEventSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.SpinThenBlockingWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.InternalWaitCore(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait(CancellationToken cancellationToken)
   at Microsoft.Data.SqlClient.SNI.SNICommon.GetDnsIpAddresses(String serverName, TimeoutTimer timeout) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNICommon.cs:line 348
   at Microsoft.Data.SqlClient.SNI.SSRP.SendUDPRequest(String browserHostname, Int32 port, Byte[] requestPacket, TimeoutTimer timeout, Boolean allIPsInParallel, SqlConnectionIPAddressPreference ipPreference) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SSRP.cs:line 190
   at Microsoft.Data.SqlClient.SNI.SSRP.GetPortByInstanceName(String browserHostName, String instanceName, TimeoutTimer timeout, Boolean allIPsInParallel, SqlConnectionIPAddressPreference ipPreference) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SSRP.cs:line 47
   at Microsoft.Data.SqlClient.SNI.SNIProxy.CreateTcpHandle(DataSource details, TimeoutTimer timeout, Boolean parallel, SqlConnectionIPAddressPreference ipPreference, String cachedFQDN, SQLDNSInfo& pendingDNSInfo, Boolean tlsFirst, String hostNameInCertificate, String serverCertificateFilename) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNIProxy.cs:line 320
   at Microsoft.Data.SqlClient.SNI.SNIProxy.CreateConnectionHandle(String fullServerName, TimeoutTimer timeout, Byte[]& instanceName, Byte[][]& spnBuffer, String serverSPN, Boolean flushCache, Boolean async, Boolean parallel, Boolean isIntegratedSecurity, SqlConnectionIPAddressPreference ipPreference, String cachedFQDN, SQLDNSInfo& pendingDNSInfo, Boolean tlsFirst, String hostNameInCertificate, String serverCertificateFilename) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNIProxy.cs:line 190
   at Microsoft.Data.SqlClient.SNI.TdsParserStateObjectManaged.CreatePhysicalSNIHandle(String serverName, TimeoutTimer timeout, Byte[]& instanceName, Byte[][]& spnBuffer, Boolean flushCache, Boolean async, Boolean parallel, SqlConnectionIPAddressPreference iPAddressPreference, String cachedFQDN, SQLDNSInfo& pendingDNSInfo, String serverSPN, Boolean isIntegratedSecurity, Boolean tlsFirst, String hostNameInCertificate, String serverCertificateFilename) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParserStateObjectManaged.cs:line 101
   at Microsoft.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, TimeoutTimer timeout, SqlConnectionString connectionOptions, Boolean withFailover) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs:line 458
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, TimeoutTimer timeout, Boolean withFailover) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/Sql

Check failure on line 1 in Microsoft.Data.SqlClient.ManualTesting.Tests.DiagnosticTest.ConnectionOpenTest

See this annotation in the file changed.

@azure-pipelines azure-pipelines / CI-SqlClient

Microsoft.Data.SqlClient.ManualTesting.Tests.DiagnosticTest.ConnectionOpenTest

System.MissingMethodException : Method not found: 'Void Xunit.Sdk.XunitException..ctor(System.String, System.String)'.
Raw output
   at Microsoft.DotNet.RemoteExecutor.RemoteExecutionException..ctor(String stackTrace)
   at Microsoft.DotNet.RemoteExecutor.RemoteInvokeHandle.Dispose(Boolean disposing) in /_/src/Microsoft.DotNet.RemoteExecutor/src/RemoteInvokeHandle.cs:line 231
   at Microsoft.DotNet.RemoteExecutor.RemoteInvokeHandle.Dispose() in /_/src/Microsoft.DotNet.RemoteExecutor/src/RemoteInvokeHandle.cs:line 57
   at Microsoft.Data.SqlClient.ManualTesting.Tests.DiagnosticTest.ConnectionOpenTest() in /_/src/Microsoft.Data.SqlClient/tests/ManualTests/TracingTests/DiagnosticTest.cs:line 438
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Check failure on line 1 in Microsoft.Data.SqlClient.Tests.SqlConnectionBasicTests.TransientFaultTestAsync(errorCode: 40613)

See this annotation in the file changed.

@azure-pipelines azure-pipelines / CI-SqlClient

Microsoft.Data.SqlClient.Tests.SqlConnectionBasicTests.TransientFaultTestAsync(errorCode: 40613)

Microsoft.Data.SqlClient.SqlException : Connection Timeout Expired.  The timeout period elapsed during the post-login phase.  The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create multiple active connections.  The duration spent while attempting to connect to this server was - [Pre-Login] initialization=1; handshake=32; [Login] initialization=0; authentication=0; [Post-Login] complete=14045; 
---- System.ComponentModel.Win32Exception : The wait operation timed out.
Raw output
   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlInternalConnection.cs:line 779
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs:line 1436
   at Microsoft.Data.SqlClient.TdsParserStateObject.ThrowExceptionAndWarning(Boolean callerHasConnectionLock, Boolean asyncClose) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs:line 866
   at Microsoft.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParserStateObject.netcore.cs:line 390
   at Microsoft.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync() in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs:line 2067
   at Microsoft.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket() in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs:line 1989
   at Microsoft.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer() in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs:line 1034
   at Microsoft.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value) in /_/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs:line 1269
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs:line 2057
   at Microsoft.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs:line 1953
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs:line 1189
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, TimeoutTimer timeout, Boolean withFailover) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs:line 1935
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs:line 1544
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs:line 1433
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool, Func`3 accessTokenCallback) in /_/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClien