File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/SqlDSEnumeratorTest Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,17 @@ namespace Microsoft.Data.SqlClient.ManualTesting.Tests
1515#endif
1616 public class SqlDataSourceEnumeratorTest
1717 {
18- [ ConditionalFact ( typeof ( DataTestUtility ) , nameof ( DataTestUtility . IsNotUsingManagedSNIOnWindows ) ) ]
18+ private static bool IsEnvironmentAvailable ( )
19+ {
20+ ServiceController [ ] services = ServiceController . GetServices ( Environment . MachineName ) ;
21+ ServiceController service = services . FirstOrDefault ( s => s . ServiceName == "SQLBrowser" ) ;
22+
23+ return DataTestUtility . IsNotUsingManagedSNIOnWindows ( ) &&
24+ service != null &&
25+ service . Status == ServiceControllerStatus . Running ;
26+ }
27+
28+ [ ConditionalFact ( nameof ( IsEnvironmentAvailable ) ) ]
1929 [ PlatformSpecific ( TestPlatforms . Windows ) ]
2030 public void SqlDataSourceEnumerator_NativeSNI ( )
2131 {
You can’t perform that action at this time.
0 commit comments