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

[browser][tests][outerloop] Standup OuterLoop tests on CI #45949

Merged
merged 27 commits into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f549a04
[browser][tests][outerloop] Standup OuterLoop tests on CI
kjpou1 Dec 11, 2020
1c14a93
System.Collections.NonGeneric.Tests passing
kjpou1 Dec 11, 2020
78532f7
System.Console.Tests passing
kjpou1 Dec 11, 2020
6cb3df0
System.Diagnostics.DiagnosticSource.Tests passing
kjpou1 Dec 11, 2020
1c7978b
System.Globalization.Tests passing
kjpou1 Dec 11, 2020
fdb4aff
System.IO.FileSystem.Tests passing after deactivating test cannot wai…
kjpou1 Dec 11, 2020
ebc37f9
System.IO.FileSystem.Tests passing - See active issue: https://github…
kjpou1 Dec 11, 2020
c391f02
Remove fat fingered code.
kjpou1 Dec 11, 2020
5d4b0eb
Merge branch 'master' of https://github.com/dotnet/runtime into wasm-…
kjpou1 Jan 4, 2021
cafa12c
Threads not supported on Browser
kjpou1 Jan 4, 2021
5ad52de
Browser does not support monitor
kjpou1 Jan 4, 2021
212103b
Browser does not support monitor
kjpou1 Jan 4, 2021
ce8b637
Browser does not support wait on monitors
kjpou1 Jan 4, 2021
3f62aa0
Merge branch 'master' of https://github.com/dotnet/runtime into wasm-…
kjpou1 Jan 5, 2021
090ff91
Browser does not support wait on monitors
kjpou1 Jan 5, 2021
d558278
Add ActiveIssue for DataFlow tests TestNullTarget_CompletionNoCaching
kjpou1 Jan 5, 2021
aa0d0ec
Add ActiveIssue for DataFlow tests
kjpou1 Jan 5, 2021
cb1266b
Add ActiveIssue for DataFlow tests
kjpou1 Jan 5, 2021
0727dd4
Add threading support conditional
kjpou1 Jan 5, 2021
c53114a
Change all Cannot wait on monitors on this runtime Browser platform c…
kjpou1 Jan 5, 2021
fe54757
Merge branch 'master' of https://github.com/dotnet/runtime into wasm-…
kjpou1 Jan 7, 2021
dda4c41
Address review comment for monitors not supported
kjpou1 Jan 7, 2021
89b8d30
Merge branch 'master' of https://github.com/dotnet/runtime into wasm-…
kjpou1 Jan 8, 2021
650ef01
Address review comments
kjpou1 Jan 8, 2021
64a2ead
Merge branch 'master' of https://github.com/dotnet/runtime into wasm-…
kjpou1 Jan 11, 2021
a9a4b6c
Add threading supported condition.
kjpou1 Jan 11, 2021
109ffcf
Merge branch 'master' of https://github.com/dotnet/runtime into wasm-…
kjpou1 Jan 14, 2021
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 @@ -40,6 +40,7 @@ public void CreateFromStream_ValidBufferSizes_CreatesWebSocket()
[OuterLoop("Uses external servers")]
[Theory]
[MemberData(nameof(EchoServers))]
[PlatformSpecific(~TestPlatforms.Browser)] // System.Net.Sockets is not supported on this platform.
radical marked this conversation as resolved.
Show resolved Hide resolved
public async Task WebSocketProtocol_CreateFromConnectedStream_CanSendReceiveData(Uri echoUri)
{
if (PlatformDetection.IsWindows7)
Expand Down Expand Up @@ -203,6 +204,7 @@ public async Task ReceiveAsync_ServerSplitHeader_ValidDataReceived()
[OuterLoop("Uses external servers")]
[Theory]
[MemberData(nameof(EchoServersAndBoolean))]
[PlatformSpecific(~TestPlatforms.Browser)] // System.Net.Sockets is not supported on this platform.
public async Task WebSocketProtocol_CreateFromConnectedStream_CloseAsyncClosesStream(Uri echoUri, bool explicitCloseAsync)
{
if (PlatformDetection.IsWindows7)
Expand Down Expand Up @@ -244,6 +246,7 @@ public async Task WebSocketProtocol_CreateFromConnectedStream_CloseAsyncClosesSt
[OuterLoop("Uses external servers")]
[Theory]
[MemberData(nameof(EchoServersAndBoolean))]
[PlatformSpecific(~TestPlatforms.Browser)] // System.Net.Sockets is not supported on this platform.
public async Task WebSocketProtocol_CreateFromConnectedStream_CloseAsyncAfterCloseReceivedClosesStream(Uri echoUri, bool useCloseOutputAsync)
{
using (var client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Common/tests/Tests/System/StringTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ void Validate(string result)
Validate(string.Concat<string>((IEnumerable<string>)values)); // Call the generic IEnumerable<T>-based overload
}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop] // mini-stress test that likely runs for several seconds
public static void Concat_String_ConcurrencySafe()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ public static void TestAddAnyTakeAny_Longrunning(int numOfAdds, int numOfTakes,
/// are consumed by consumers with no element lost nor consumed more than once.</summary>
/// <param name="threads">Total number of producer and consumer threads.</param>
/// <param name="numOfElementsPerThread">Number of elements to Add/Take per thread.</param>
[Theory]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[InlineData(4, 2048, 2, 64)]
[OuterLoop]
private static void TestConcurrentAddAnyTakeAny(int numOfThreads, int numOfElementsPerThread, int numOfCollections, int boundOfCollections)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ public static void TestTryUpdate()
}

[OuterLoop("Runs for several seconds")]
[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
public void ConcurrentWriteRead_NoTornValues()
{
var cd = new ConcurrentDictionary<int, KeyValuePair<long, long>>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ public void ManyConcurrentAddsTakes_EnsureTrackedCountsMatchResultingCollection(
}
}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop]
public void ManyConcurrentAddsTakes_CollectionRemainsConsistent()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ public class Hashtable_ItemThreadSafetyTests

private const int MAX_TEST_TIME_MS = 10000; // 10 seconds

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop]
public void GetItem_ThreadSafety()
{
Expand Down Expand Up @@ -1100,7 +1100,7 @@ public class Hashtable_SynchronizedTests
private Hashtable _hash2;
private int _iNumberOfElements = 20;

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop]
public void SynchronizedThreadSafety()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ public class SortedList_SyncRootTests
private SortedList _sortListGrandDaughter;
private const int NumberOfElements = 100;

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop]
public void GetSyncRootBasic()
{
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 @@ -276,7 +276,7 @@ public static void Title_SetNull_ThrowsArgumentNullException()
AssertExtensions.Throws<ArgumentNullException>("value", () => Console.Title = null);
}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop] // makes noise, not very inner-loop friendly
public static void Beep_Invoke_Success()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ public void AllListenersCheckCatchupList()
/// Stresses the AllListeners by having many threads be adding and removing.
/// </summary>
[OuterLoop]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/28772")]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process), nameof(PlatformDetection.IsThreadingSupported))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/28772")]
[InlineData(100, 100)] // run multiple times to stress it further
[InlineData(100, 101)]
[InlineData(100, 102)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public void ValidateUsingCasedRegionName(string regionName)
[Theory]
[InlineData("en-US", "United States")]
[OuterLoop("May fail on machines with multiple language packs installed")] // see https://github.com/dotnet/runtime/issues/30132
[ActiveIssue("https://github.com/dotnet/runtime/issues/45951", TestPlatforms.Browser)]
public void DisplayName(string name, string expected)
{
using (new ThreadCultureChange(null, new CultureInfo(name)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public void ValidWrite(int size)

[Fact]
[OuterLoop]
[ActiveIssue("https://github.com/dotnet/runtime/issues/45954", TestPlatforms.Browser)]
public void ReadFileOver2GB()
{
string path = GetTestFilePath();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public Task AlreadyCanceledAsync()

[Fact]
[OuterLoop]
[ActiveIssue("https://github.com/dotnet/runtime/issues/45954", TestPlatforms.Browser)]
public Task ReadFileOver2GBAsync()
{
string path = GetTestFilePath();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public Task ManyConcurrentWriteAsyncs()
numWrites: 10);
}

[Theory]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[MemberData(nameof(MemberData_FileStreamAsyncWriting))]
[OuterLoop] // many combinations: we test just one in inner loop and the rest outer
public async Task ManyConcurrentWriteAsyncs_OuterLoop(
Expand Down
3 changes: 2 additions & 1 deletion src/libraries/System.Linq.Expressions/tests/CompilerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ public static void CompileDeepTree_NoStackOverflow(bool useInterpreter)
Assert.Equal(n, f());
}

[Theory, ClassData(typeof(CompilationTypes))]
[ClassData(typeof(CompilationTypes))]
[OuterLoop("May fail with SO on Debug JIT")]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
public static void CompileDeepTree_NoStackOverflowFast(bool useInterpreter)
{
Expression e = Expression.Constant(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,8 @@ public static void Grow_Large()
}

[OuterLoop]
[Theory]
[InlineData(5)]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
public static void ThreadSafe_Stress(int executionTimeSeconds) // do some minimal verification that an instance can be used concurrently
{
using (var ss = new SecureString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ public static void MoreThan64EnumValuesToSerializeWithNamingPolicy()
}
}

[Fact, OuterLoop]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop]
public static void VeryLargeAmountOfEnumsToSerialize()
{
// Ensure we don't throw OutOfMemoryException.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class ConcurrentTests
static readonly int s_dop = Environment.ProcessorCount * 2;
const int IterationCount = 10000;

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop] // should be a stress test that runs for a while, but needs cleanup
public void RunConcurrentTests()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public void TestNullTarget_Completion()

[Fact]
[OuterLoop] // finalizer/GC interactions
[ActiveIssue("https://github.com/dotnet/runtime/issues/46566", TestPlatforms.Browser)]
public void TestNullTarget_CompletionNoCaching()
{
// Make sure that the Completion task returned by a NullTarget
Expand Down Expand Up @@ -343,6 +344,7 @@ public async Task TestAsObservableAndAsObserver_AllObserversGetData()

[Fact]
[OuterLoop] // stress test
[ActiveIssue("https://github.com/dotnet/runtime/issues/46566", TestPlatforms.Browser)]
public void TestAsObservableAndAsObserver_AsObservableDoesntLeak()
{
const int Count = 1000;
Expand Down Expand Up @@ -1004,7 +1006,7 @@ public async Task TestReceive_NotYetAvailable()
Assert.Equal(expected: 6, actual: await t4);
}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop] // timeout involved
public async Task TestReceive_Timeout()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public void TestInputCount()
}
}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop] // spins waiting for a condition to be true, though it should happen very quickly
public async Task TestCount()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public void TestInputCount()
}
}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop] // spins waiting for a condition to be true, though it should happen very quickly
public async Task TestCount()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,7 @@ public static async Task CancellationTokenRegistration_ConcurrentUnregisterWithC
}

[OuterLoop("Runs for several seconds")]
[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
public static void Unregister_ConcurrentUse_ThreadSafe()
{
CancellationTokenRegistration reg = default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public sealed class TaskAPMTests : IDisposable
/// </summary>
private const int LongTaskMilliseconds = 100;

[Theory]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop]
[InlineData(true)]
[InlineData(false)]
Expand Down Expand Up @@ -110,7 +110,7 @@ public void WaitOnAsyncWaitHandleTechnique(bool hasReturnType)
Assert.False(asyncResult.CompletedSynchronously, "Should not have completed synchronously.");
}

[Theory]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[OuterLoop]
[InlineData(true)]
[InlineData(false)]
Expand Down
Loading