File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
System.IO.FileSystem/tests/FileStream Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -85,15 +85,23 @@ public class UncFilePathFileStreamStandaloneConformanceTests : UnbufferedAsyncFi
8585
8686 private static Lazy < bool > _canShareFiles = new Lazy < bool > ( ( ) =>
8787 {
88- if ( ! PlatformDetection . IsWindowsAndElevated || PlatformDetection . IsWindowsNanoServer )
88+ if ( ! PlatformDetection . IsWindowsAndElevated )
8989 {
9090 return false ;
9191 }
9292
93- // the "Server Service" allows for file sharing. It can be disabled on some of our CI machines.
94- using ( ServiceController sharingService = new ServiceController ( "Server" ) )
93+ try
94+ {
95+ // the "Server Service" allows for file sharing. It can be disabled on some machines.
96+ using ( ServiceController sharingService = new ServiceController ( "Server" ) )
97+ {
98+ return sharingService . Status == ServiceControllerStatus . Running ;
99+ }
100+ }
101+ catch ( InvalidOperationException )
95102 {
96- return sharingService . Status == ServiceControllerStatus . Running ;
103+ // The service is not installed.
104+ return false ;
97105 }
98106 } ) ;
99107
Original file line number Diff line number Diff line change 485485 <!-- More than two thirds of tests failing due to ref emit -->
486486 <ProjectExclusions Include =" $(MSBuildThisFileDirectory)Microsoft.Extensions.DependencyInjection\tests\DI.Tests\Microsoft.Extensions.DependencyInjection.Tests.csproj" />
487487
488- <!-- This test fails on Windows.10.Amd64.Server2022 -->
489- <ProjectExclusions Include =" $(MSBuildThisFileDirectory)System.IO.FileSystem\tests\System.IO.FileSystem.Tests.csproj" />
490488 <!-- Needs work to get these tests to pass -->
491489 <!-- These tests have failures-->
492490 <!-- Looks like our xunit runner doesn't respect tests that don't want to be multithreaded -->
You can’t perform that action at this time.
0 commit comments