Skip to content

Commit

Permalink
WASM: Disable thread related tests on System.IO.Compression (dotnet#3…
Browse files Browse the repository at this point in the history
…9231)

They try to test various conditions that only work if you have multiple threads which is not the case on WebAssembly.
  • Loading branch information
akoeplinger authored Jul 14, 2020
1 parent 8391d21 commit 4697d9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public abstract class CompressionStreamUnitTestBase : CompressionStreamTestBase
{
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)
Expand Down Expand Up @@ -49,7 +49,7 @@ public virtual void FlushAsync_DuringWriteAsync()
}
}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
public async Task FlushAsync_DuringReadAsync()
{
if (FlushNoOps)
Expand Down Expand Up @@ -78,7 +78,7 @@ public async Task FlushAsync_DuringReadAsync()
}
}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
public async Task FlushAsync_DuringFlushAsync()
{
if (FlushNoOps)
Expand Down Expand Up @@ -121,7 +121,7 @@ public async Task FlushAsync_DuringFlushAsync()
}
}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
public virtual void WriteAsync_DuringWriteAsync()
{
byte[] buffer = new byte[100000];
Expand Down Expand Up @@ -154,7 +154,7 @@ public virtual void WriteAsync_DuringWriteAsync()
}
}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
public async Task ReadAsync_DuringReadAsync()
{
byte[] buffer = new byte[32];
Expand All @@ -179,7 +179,7 @@ public async Task ReadAsync_DuringReadAsync()
}
}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
public virtual async Task Dispose_WithUnfinishedReadAsync()
{
string compressedPath = CompressedTestFile(UncompressedTestFile());
Expand Down
1 change: 0 additions & 1 deletion src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Globalization.Calendars\tests\System.Globalization.Calendars.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Globalization.Extensions\tests\System.Globalization.Extensions.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Globalization\tests\System.Globalization.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO.Compression\tests\System.IO.Compression.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO.FileSystem.DriveInfo\tests\System.IO.FileSystem.DriveInfo.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO.FileSystem\tests\System.IO.FileSystem.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.IO.MemoryMappedFiles\tests\System.IO.MemoryMappedFiles.Tests.csproj" />
Expand Down

0 comments on commit 4697d9b

Please sign in to comment.