From 4697d9b0d1045f72a117d7c976084b39f15a0cf2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexander=20K=C3=B6plinger?= Date: Tue, 14 Jul 2020 11:54:20 +0200 Subject: [PATCH] WASM: Disable thread related tests on System.IO.Compression (#39231) They try to test various conditions that only work if you have multiple threads which is not the case on WebAssembly. --- .../IO/Compression/CompressionStreamUnitTestBase.cs | 12 ++++++------ src/libraries/tests.proj | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs b/src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs index e8aeadb8576..90a6c35c0f2 100644 --- a/src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs +++ b/src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs @@ -14,7 +14,7 @@ namespace System.IO.Compression { private const int TaskTimeout = 30 * 1000; // Generous timeout for official test runs - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public virtual void FlushAsync_DuringWriteAsync() { if (FlushNoOps) @@ -49,7 +49,7 @@ namespace System.IO.Compression } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task FlushAsync_DuringReadAsync() { if (FlushNoOps) @@ -78,7 +78,7 @@ namespace System.IO.Compression } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task FlushAsync_DuringFlushAsync() { if (FlushNoOps) @@ -121,7 +121,7 @@ namespace System.IO.Compression } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public virtual void WriteAsync_DuringWriteAsync() { byte[] buffer = new byte[100000]; @@ -154,7 +154,7 @@ namespace System.IO.Compression } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public async Task ReadAsync_DuringReadAsync() { byte[] buffer = new byte[32]; @@ -179,7 +179,7 @@ namespace System.IO.Compression } } - [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public virtual async Task Dispose_WithUnfinishedReadAsync() { string compressedPath = CompressedTestFile(UncompressedTestFile()); diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index ec074e10721..96eb0aed551 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -37,7 +37,6 @@ - -- 2.34.1