Skip to content

Commit 86293a1

Browse files
committed
Narrow test filtering to single-threaded
1 parent 45af681 commit 86293a1

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/libraries/System.Console/tests/SyncTextWriter.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
public class SyncTextWriter
1414
{
15-
[Fact]
16-
[SkipOnPlatform(TestPlatforms.Browser, "Browser bypasses SyncTextWriter for faster startup")]
15+
// Browser bypasses SyncTextWriter for faster startup
16+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
1717
public void SyncTextWriterLockedOnThis()
1818
{
1919
TextWriter oldWriter = Console.Out;

src/libraries/System.Runtime/tests/System.IO.Tests/StreamReader/StreamReader.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public void ObjectClosedReadLineBaseStream()
2929
Assert.Throws<ObjectDisposedException>(() => sr.ReadLine());
3030
}
3131

32-
[Fact]
33-
[SkipOnPlatform(TestPlatforms.Browser, "Browser bypasses SyncTextWriter for faster startup")]
32+
// Browser bypasses SyncTextWriter for faster startup
33+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
3434
public void Synchronized_NewObject()
3535
{
3636
using (Stream str = GetLargeStream())

src/libraries/System.Runtime/tests/System.IO.Tests/StreamWriter/StreamWriter.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ namespace System.IO.Tests
77
{
88
public partial class WriteTests
99
{
10-
[Fact]
11-
[SkipOnPlatform(TestPlatforms.Browser, "Browser bypasses SyncTextWriter for faster startup")]
10+
// Browser bypasses SyncTextWriter for faster startup
11+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
1212
public void Synchronized_NewObject()
1313
{
1414
using (Stream str = CreateStream())

src/libraries/System.Runtime/tests/System.IO.Tests/TextWriter/TextWriterTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,8 @@ public void DisposeAsync_ExceptionReturnedInTask()
690690
Assert.Same(e, vt.AsTask().Exception.InnerException);
691691
}
692692

693-
[Fact]
694-
[SkipOnPlatform(TestPlatforms.Browser, "Browser bypasses SyncTextWriter for faster startup")]
693+
// Browser bypasses SyncTextWriter for faster startup
694+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
695695
public async Task FlushAsync_Precanceled()
696696
{
697697
Assert.Equal(TaskStatus.RanToCompletion, TextWriter.Null.FlushAsync(new CancellationToken(true)).Status);

0 commit comments

Comments
 (0)