Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] Fix WebSocket failures on wasm test runs #102366

Merged
merged 6 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,8 @@ from writeSize in new[] { 10 * 1024 * 1024 }
from startWithFlush in new[] { false, true }
select new object[] { mode, writeSize, startWithFlush };

[OuterLoop]
[OuterLoop("May take several seconds", ~TestPlatforms.Browser)]
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on browser")]
[Theory]
[MemberData(nameof(ReadWrite_Success_Large_MemberData))]
public virtual async Task ReadWrite_Success_Large(ReadWriteMode mode, int writeSize, bool startWithFlush) =>
Expand Down Expand Up @@ -2438,7 +2439,8 @@ public static IEnumerable<object[]> CopyToAsync_AllDataCopied_MemberData() =>
from useAsync in new bool[] { true, false }
select new object[] { byteCount, useAsync };

[OuterLoop]
[OuterLoop("May take several seconds", ~TestPlatforms.Browser)]
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on browser")]
[Theory]
[InlineData(false)]
[InlineData(true)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public static void TestWriteDeficientXParameters(bool includePrivateParameters)
}

[ConditionalFact(typeof(DSAFactory), nameof(DSAFactory.SupportsKeyGeneration))]
[OuterLoop("DSA key generation is very slow")]
[OuterLoop("DSA key generation is very slow", ~TestPlatforms.Browser)]
public static void FromToXml()
{
using (DSA dsa = DSAFactory.Create())
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/System.Console/tests/WindowAndCursorProps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public static void Beep_Invoke_Success()
}

[Fact]
[OuterLoop] // makes noise, not very inner-loop friendly
[OuterLoop("makes noise, not very inner-loop friendly", ~TestPlatforms.Browser)]
[PlatformSpecific(TestPlatforms.Windows)]
public static void BeepWithFrequency_Invoke_Success()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public static IEnumerable<object[]> NotLoadBalancedDegreeData(int[] counts, int[

[Theory]
[MemberData(nameof(DegreeData), new[] { 1024 }, new[] { 1, 4, 512 })]
[OuterLoop]
[OuterLoop("Resource-intensive due to parallel processing", ~TestPlatforms.Browser)]
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on browser")]
public static void DegreeOfParallelism(Labeled<ParallelQuery<int>> labeled, int count, int degree)
{
Assert.Equal(Functions.SumRange(0, count), labeled.Item.WithDegreeOfParallelism(degree).Sum());
Expand Down Expand Up @@ -93,7 +94,8 @@ public static void DegreeOfParallelism_Throttled_Pipelining(Labeled<ParallelQuer
[Theory]
[MemberData(nameof(NotLoadBalancedDegreeData), new[] { 1, 4 }, new int[] { /* same as count */ })]
[MemberData(nameof(NotLoadBalancedDegreeData), new[] { 32, 512, 1024 }, new[] { 4, 16 })]
[OuterLoop]
[OuterLoop("Resource-intensive due to parallel processing", ~TestPlatforms.Browser)]
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on browser")]
public static void DegreeOfParallelism_Aggregate_Accumulator(Labeled<ParallelQuery<int>> labeled, int count, int degree)
{
ParallelQuery<int> query = labeled.Item;
Expand All @@ -111,7 +113,8 @@ public static void DegreeOfParallelism_Aggregate_Accumulator(Labeled<ParallelQue
[Theory]
[MemberData(nameof(NotLoadBalancedDegreeData), new[] { 1, 4 }, new int[] { /* same as count */ })]
[MemberData(nameof(NotLoadBalancedDegreeData), new[] { 32, 512, 1024 }, new[] { 4, 16 })]
[OuterLoop]
[OuterLoop("Resource-intensive due to parallel processing", ~TestPlatforms.Browser)]
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on browser")]
public static void DegreeOfParallelism_Aggregate_SeedFunction(Labeled<ParallelQuery<int>> labeled, int count, int degree)
{
ParallelQuery<int> query = labeled.Item;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ public static void Zip_NotPipelined_Longrunning(Labeled<ParallelQuery<int>> left
// Zip with ordering on showed issues, but it was due to the ordering component.
// This is included as a regression test for that particular repro.
[Theory]
[OuterLoop]
[OuterLoop("Resource-intensive due to parallel processing", ~TestPlatforms.Browser)]
[SkipOnPlatform(TestPlatforms.Browser, "Not supported on browser")]
[MemberData(nameof(ZipThreadedData), new[] { 1, 2, 16, 128, 1024 }, new[] { 1, 2, 4, 7, 8, 31, 32 })]
public static void Zip_AsOrdered_ThreadedDeadlock(Labeled<ParallelQuery<int>> left, int leftCount, Labeled<ParallelQuery<int>> right, int rightCount, int degree)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void CreateFromStream_ValidBufferSizes_CreatesWebSocket()
Assert.NotNull(CreateFromStream(new MemoryStream(), true, null, Timeout.InfiniteTimeSpan));
}

[OuterLoop("Uses external servers")]
[OuterLoop("Uses external servers", ~TestPlatforms.Browser)]
[Theory]
[MemberData(nameof(EchoServers))]
[SkipOnPlatform(TestPlatforms.Browser, "System.Net.Sockets is not supported on this platform.")]
Expand Down Expand Up @@ -230,7 +230,7 @@ public async Task ReceiveAsync_ServerSplitHeader_ValidDataReceived()
}
}

[OuterLoop("Uses external servers")]
[OuterLoop("Uses external servers", ~TestPlatforms.Browser)]
[Theory]
[MemberData(nameof(EchoServersAndBoolean))]
[SkipOnPlatform(TestPlatforms.Browser, "System.Net.Sockets is not supported on this platform.")]
Expand Down Expand Up @@ -272,7 +272,7 @@ public async Task WebSocketProtocol_CreateFromConnectedStream_CloseAsyncClosesSt
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/28957")]
[OuterLoop("Uses external servers")]
[OuterLoop("Uses external servers", ~TestPlatforms.Browser)]
[Theory]
[MemberData(nameof(EchoServersAndBoolean))]
[SkipOnPlatform(TestPlatforms.Browser, "System.Net.Sockets is not supported on this platform.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public void RecursiveDeleteWithTrailingSlash()

[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
[OuterLoop("This test is very slow.")]
[OuterLoop("This test is very slow.", ~TestPlatforms.Browser)]
public void RecursiveDelete_DeepNesting()
{
// Create a 2000 level deep directory and recursively delete from the root.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void NullArg_ThrowsException()
// because EFS (Encrypted File System), its underlying technology, is not available on these operating systems.
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer), nameof(PlatformDetection.IsNotWindowsHomeEdition))]
[PlatformSpecific(TestPlatforms.Windows)]
[OuterLoop] // Occasional failures: https://github.com/dotnet/runtime/issues/12339
[OuterLoop("Occasional failures", ~TestPlatforms.Browser)] // Occasional failures: https://github.com/dotnet/runtime/issues/12339
public void EncryptDecrypt_Read()
{
string tmpFileName = Path.GetTempFileName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public static void X509Cert2Test()

[ActiveIssue("https://github.com/dotnet/runtime/issues/26213")]
[ConditionalFact]
[OuterLoop("May require using the network, to download CRLs and intermediates")]
[OuterLoop("May require using the network, to download CRLs and intermediates", ~TestPlatforms.Browser)]
public void TestVerify()
{
bool success;
Expand Down Expand Up @@ -861,7 +861,7 @@ public static void CertificateSha3Signed()
}

[ConditionalFact(typeof(PlatformSupport), nameof(PlatformSupport.PlatformCryptoProviderFunctionalP256))]
[OuterLoop("Hardware backed key generation takes several seconds.")]
[OuterLoop("Hardware backed key generation takes several seconds.", ~TestPlatforms.Browser)]
public static void CreateCertificate_MicrosoftPlatformCryptoProvider_EcdsaKey()
{
using (CngPlatformProviderKey platformKey = new CngPlatformProviderKey(CngAlgorithm.ECDsaP256))
Expand All @@ -882,7 +882,7 @@ public static void CreateCertificate_MicrosoftPlatformCryptoProvider_EcdsaKey()
}

[ConditionalFact(typeof(PlatformSupport), nameof(PlatformSupport.PlatformCryptoProviderFunctionalRsa))]
[OuterLoop("Hardware backed key generation takes several seconds.")]
[OuterLoop("Hardware backed key generation takes several seconds.", ~TestPlatforms.Browser)]
public static void CreateCertificate_MicrosoftPlatformCryptoProvider_RsaKey()
{
using (CngPlatformProviderKey platformKey = new CngPlatformProviderKey(CngAlgorithm.Rsa))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public static void TestResetMethod()
/// and trusted root. It will fail to build any chain if those are not valid.
/// </summary>
[Fact]
[OuterLoop]
[OuterLoop("May take a long time on some platforms", ~TestPlatforms.Browser)]
[SkipOnPlatform(TestPlatforms.Android, "Not supported on Android.")]
public static void BuildChainExtraStoreUntrustedRoot()
{
Expand Down Expand Up @@ -656,7 +656,7 @@ public static void BuildChain_FailOnlyApplicationPolicy()
}

[ConditionalFact(nameof(TrustsMicrosoftDotComRoot))]
[OuterLoop(/* Modifies user certificate store */)]
[OuterLoop("Modifies user certificate store", ~TestPlatforms.Browser)]
[SkipOnPlatform(PlatformSupport.MobileAppleCrypto, "Root certificate store is not accessible")]
public static void BuildChain_MicrosoftDotCom_WithRootCertInUserAndSystemRootCertStores()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public static void ExportAsPfxWithPrivateKey()

[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
[OuterLoop("Modifies user-persisted state")]
[OuterLoop("Modifies user-persisted state", ~TestPlatforms.Browser)]
public static void ExportDoesNotCorruptPrivateKeyMethods()
{
string keyName = $"clrtest.{Guid.NewGuid():D}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace System.Security.Cryptography.X509Certificates.Tests.RevocationTests
{
[OuterLoop("These tests run serially at about 1 second each, and the code shouldn't change that often.")]
[OuterLoop("These tests run serially at about 1 second each, and the code shouldn't change that often.", ~TestPlatforms.Browser)]
[ConditionalClass(typeof(DynamicRevocationTests), nameof(SupportsDynamicRevocation))]
[SkipOnPlatform(TestPlatforms.Browser, "Browser doesn't support X.509 certificates")]
public static partial class DynamicRevocationTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace System.Security.Cryptography.X509Certificates.Tests.RevocationTests
{
[OuterLoop("These tests exercise timeout properties which take a lot of time.")]
[OuterLoop("These tests exercise timeout properties which take a lot of time.", ~TestPlatforms.Browser)]
[SkipOnPlatform(TestPlatforms.Browser, "Browser doesn't support X.509 certificates")]
public static class TimeoutTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public async Task SourceGenerator_Supports_All_Cultures()

// This test takes a long time to run since it needs to compute all possible lowercase mappings across
// 3 different cultures and then creates Regex matches for all of our engines for each mapping.
[OuterLoop]
[OuterLoop("Takes long time to run", ~TestPlatforms.Browser)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/67793")]
[Theory]
[MemberData(nameof(Unicode_IgnoreCase_TestData))]
Expand Down
Loading