System.Data.SqlClient.Tests.ExceptionTest.NamedPipeTest failed in CI
COnfiguration: OuterLoop_Windows10_release (build#134)
Detail: https://ci.dot.net/job/dotnet_corefx/job/master/job/outerloop_win10_release/134/consoleText
System.Data.SqlClient.Tests.ExceptionTest.NamedPipeTest(dataSource: \"np:\\\\\\\\.\\\\pipe\\\\sqlbad\\\\query\") [FAIL]
Assert.Contains() Failure
Not found: (provider: Named Pipes Provider, error: 11 - Timeout error)
In value: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Stack Trace:
D:\j\workspace\outerloop_win---6835b088\src\System.Data.SqlClient\tests\FunctionalTests\ExceptionTest.cs(116,0): at System.Data.SqlClient.Tests.ExceptionTest.VerifyConnectionFailure[TException](Action connectAction, String expectedExceptionMessage, Func`2 exVerifier)
D:\j\workspace\outerloop_win---6835b088\src\System.Data.SqlClient\tests\FunctionalTests\ExceptionTest.cs(124,0): at System.Data.SqlClient.Tests.ExceptionTest.VerifyConnectionFailure[TException](Action connectAction, String expectedExceptionMessage)
D:\j\workspace\outerloop_win---6835b088\src\System.Data.SqlClient\tests\FunctionalTests\ExceptionTest.cs(91,0): at System.Data.SqlClient.Tests.ExceptionTest.NamedPipeTest(String dataSource)
Failed again on Windows 10, detail: https://ci.dot.net/job/dotnet_corefx/job/master/job/outerloop_win10_debug/130/testReport/System.Data.SqlClient.Tests/ExceptionTest/NamedPipeTest_dataSource____np______________pipe____sqlbad____query___/
Actually all these connection strings generate not a timeout exception but a connection exception: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server" because pipes are named in such a way that they are not configured on the machine (e.g. "np:\.\pipe\sqlbad\query"). I can change the expected exception.
Failed again on windows 10, detail: https://ci.dot.net/job/dotnet_corefx/job/master/job/outerloop_win10_debug/lastCompletedBuild/testReport/System.Data.SqlClient.Tests/ExceptionTest/NamedPipeTest_dataSource____np______________pipe____sqlbad____query___/
Failed again on windows10_debug and windows10_release
Failed again here: https://ci.dot.net/job/dotnet_corefx/job/master/job/outerloop_win10_debug_prtest/9/consoleText
Failed again here: https://github.com/dotnet/corefx/pull/17553
Failed again here: https://ci.dot.net/job/dotnet_corefx/job/master/job/outerloop_win10_debug/135/consoleText
Looks like this was happening when native SNI was still the default. Since we're using managed SNI as the default in SqlClient, this issue no longer reproduces.