Skip to content

Commit 7eb6c0c

Browse files
authored
[browser][MT] enable all MT library tests on the runtime CI pipeline (#91536)
* Non-smoke MT tests. * Disable tests: System.Timer, Threading, Local * System.Threading.Tasks is mostly fleaky, cannot block one by one. * Threading.Task.Parallel - ParallelForeachPartitioner and ParallelForTests are fleaky, cannot define which tests fail, blocking suspicious ones. * No tests can be run in MT. * Fails even when no tests enabled. * System.Runtime disable failing tests. * To be reverted! Apply tmp dev speedup suggested. * System.Runtime.Serialization.Xml.Tests disabled. * System.Runtime.Extensions.Tests disabled. * System.Private.Xml.Tests disabled. * System.Linq.Parallel.Tests disabled. * ystem.IO.Pipelines.Tests disabled * System.Globalization.Tests disabled. * System.Composition.Tests disabled. * System.ComponentModel.TypeConverter.Tests disabled. * System.Collections.NonGeneric.Tests disabled. * System.Collections.Concurrent.Tests cannot define which tests are failing, disable full project. * Microsoft.Extensions.Logging.Console.Tests disabled. * Microsoft.Extensions.Http.Tests disabled. * Microsoft.Extensions.HostFactoryResolver.Tests disabled. * Microsoft.Extensions.Configuration.Functional.Tests disabled. * Microsoft.Extensions.Configuration.EnvironmentVariables.Tests disabled. * Disable samples on mt. * For non-mt it should stay excluded. * Revert ab5472c * Fix a copy-paste error. * Default: only smoke. * Duplicated job suffix, after disabling failing tests we should fail on error. * Feedback - revert shouldContinueOnError removal.
1 parent 9c985a9 commit 7eb6c0c

File tree

56 files changed

+281
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+281
-18
lines changed

eng/pipelines/extra-platforms/runtime-extra-platforms-wasm.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -105,22 +105,6 @@ jobs:
105105
- WasmTestOnBrowser
106106
- WasmTestOnNodeJS
107107

108-
# Smoke tests only with full threading
109-
- template: /eng/pipelines/common/templates/wasm-library-tests.yml
110-
parameters:
111-
platforms:
112-
- browser_wasm
113-
#- browser_wasm_win
114-
nameSuffix: _Threading_Smoke
115-
extraBuildArgs: /p:MonoWasmBuildVariant=multithread /p:WasmEnableThreads=true /p:_WasmPThreadPoolSize=8 /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
116-
shouldRunSmokeOnly: true
117-
isExtraPlatformsBuild: ${{ parameters.isExtraPlatformsBuild }}
118-
isWasmOnlyBuild: ${{ parameters.isWasmOnlyBuild }}
119-
# Always run for runtime-wasm because browser testing is not on runtime
120-
alwaysRun: ${{ parameters.isWasmOnlyBuild }}
121-
scenarios:
122-
- WasmTestOnBrowser
123-
124108
# Library tests with full threading
125109
- template: /eng/pipelines/common/templates/wasm-library-tests.yml
126110
parameters:
@@ -134,7 +118,7 @@ jobs:
134118
# Always run for runtime-wasm because tests are not run in runtime
135119
alwaysRun: ${{ parameters.isWasmOnlyBuild }}
136120

137-
# NOTE - Since threading is experimental, we don't want to block mainline work
121+
# NOTE - Since threading is experimental, we don't want to block mainline work
138122
shouldContinueOnError: true
139123
scenarios:
140124
- WasmTestOnBrowser

src/libraries/Common/tests/System/TimeProviderTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ public static IEnumerable<object[]> TimersProvidersData()
109109
}
110110

111111
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
112+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
112113
[MemberData(nameof(TimersProvidersData))]
113114
public void TestProviderTimer(TimeProvider provider, int MaxMilliseconds)
114115
{
@@ -215,6 +216,7 @@ private static void CancelAfter(TimeProvider provider, CancellationTokenSource c
215216
#endif // NETFRAMEWORK
216217

217218
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
219+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
218220
[MemberData(nameof(TimersProvidersListData))]
219221
public static void CancellationTokenSourceWithTimer(TimeProvider provider)
220222
{

src/libraries/Microsoft.Extensions.Configuration.EnvironmentVariables/tests/EnvironmentVariablesTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ public void AddEnvironmentVariablesUsingPrefixWithDoubleUnderscores_Bind_PrefixM
284284
}
285285

286286
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
287+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
287288
public void BindingDoesNotThrowIfReloadedDuringBinding()
288289
{
289290
var dic = new Dictionary<string, string>

src/libraries/Microsoft.Extensions.Configuration/tests/FunctionalTests/ConfigurationTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ public void LoadAndCombineKeyValuePairsFromDifferentConfigurationProvidersWithAb
286286
}
287287

288288
[Fact]
289+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
289290
public void CanOverrideValuesWithNewConfigurationProvider()
290291
{
291292
WriteTestFiles();
@@ -940,6 +941,7 @@ await WaitForChange(
940941
}
941942

942943
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
944+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
943945
public void BindingDoesNotThrowIfReloadedDuringBinding()
944946
{
945947
WriteTestFiles();

src/libraries/Microsoft.Extensions.HostFactoryResolver/tests/HostFactoryResolverTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ public void ApplicationNameSetFromArgument()
285285
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
286286
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(NoSpecialEntryPointPattern.Program))]
287287
[ActiveIssue("https://github.com/dotnet/runtime/issues/73420", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
288+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
288289
public void NoSpecialEntryPointPatternCanRunInParallel()
289290
{
290291
var factory = HostFactoryResolver.ResolveServiceProviderFactory(typeof(NoSpecialEntryPointPattern.Program).Assembly, s_WaitTimeout);

src/libraries/Microsoft.Extensions.Http/tests/Microsoft.Extensions.Http.Tests/DependencyInjection/HttpClientFactoryServiceCollectionExtensionsTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,7 @@ public async Task AddHttpClient_MessageHandler_Scope_TransientDependency()
12041204
}
12051205

12061206
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported), nameof(PlatformDetection.IsReflectionEmitSupported))]
1207+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91541", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
12071208
public void AddHttpClient_GetAwaiterAndResult_InSingleThreadedSynchronizationContext_ShouldNotHangs()
12081209
{
12091210
// Arrange
@@ -1367,6 +1368,7 @@ public void SuppressScope_True_InScope_DoesNotCreateScope()
13671368
}
13681369

13691370
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
1371+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91673", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
13701372
public void AddHttpClient_ConfigurePrimaryHttpMessageHandler_ApplyChangesPrimaryHandler()
13711373
{
13721374
// Arrange

src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleFormatterTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ internal static (ConsoleLogger Logger, ConsoleSink Sink, ConsoleSink ErrorSink,
7474
}
7575

7676
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
77+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
7778
public void ConsoleLoggerOptions_TimeStampFormat_IsReloaded()
7879
{
7980
// Arrange
@@ -87,6 +88,7 @@ public void ConsoleLoggerOptions_TimeStampFormat_IsReloaded()
8788
}
8889

8990
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
91+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
9092
[MemberData(nameof(FormatterNames))]
9193
public void InvalidLogLevel_Throws(string formatterName)
9294
{
@@ -101,6 +103,7 @@ public void InvalidLogLevel_Throws(string formatterName)
101103
}
102104

103105
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
106+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
104107
[MemberData(nameof(FormatterNamesAndLevels))]
105108
public void NoMessageOrException_Noop(string formatterName, LogLevel level)
106109
{
@@ -120,6 +123,7 @@ public void NoMessageOrException_Noop(string formatterName, LogLevel level)
120123
}
121124

122125
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
126+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
123127
[MemberData(nameof(FormatterNamesAndLevels))]
124128
public void Log_LogsCorrectTimestamp(string formatterName, LogLevel level)
125129
{

src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerExtensionsTests.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public void AddConsoleFormatter_NullConfigure_Throws()
7676
}
7777

7878
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
79+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
7980
[MemberData(nameof(FormatterNames))]
8081
public void AddConsole_ConsoleLoggerOptionsFromConfigFile_IsReadFromLoggingConfiguration(string formatterName)
8182
{
@@ -155,6 +156,7 @@ private class CustomOptions : ConsoleFormatterOptions
155156
}
156157

157158
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
159+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
158160
public void AddSimpleConsole_ChangeProperties_IsReadFromLoggingConfiguration()
159161
{
160162
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
@@ -185,6 +187,7 @@ public void AddSimpleConsole_ChangeProperties_IsReadFromLoggingConfiguration()
185187
}
186188

187189
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
190+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
188191
public void AddSimpleConsole_OutsideConfig_TakesProperty()
189192
{
190193
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
@@ -215,6 +218,7 @@ public void AddSimpleConsole_OutsideConfig_TakesProperty()
215218
}
216219

217220
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
221+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
218222
public void AddSystemdConsole_ChangeProperties_IsReadFromLoggingConfiguration()
219223
{
220224
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
@@ -241,6 +245,7 @@ public void AddSystemdConsole_ChangeProperties_IsReadFromLoggingConfiguration()
241245
}
242246

243247
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
248+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
244249
public void AddSystemdConsole_OutsideConfig_TakesProperty()
245250
{
246251
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
@@ -271,6 +276,7 @@ public void AddSystemdConsole_OutsideConfig_TakesProperty()
271276
}
272277

273278
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
279+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
274280
public void AddJsonConsole_ChangeProperties_IsReadFromLoggingConfiguration()
275281
{
276282
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
@@ -299,6 +305,7 @@ public void AddJsonConsole_ChangeProperties_IsReadFromLoggingConfiguration()
299305
}
300306

301307
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
308+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
302309
public void AddJsonConsole_OutsideConfig_TakesProperty()
303310
{
304311
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
@@ -333,6 +340,7 @@ public void AddJsonConsole_OutsideConfig_TakesProperty()
333340
}
334341

335342
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
343+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
336344
public void AddConsole_NullFormatterNameUsingSystemdFormat_AnyDeprecatedPropertiesOverwriteFormatterOptions()
337345
{
338346
var configs = new[] {
@@ -378,6 +386,7 @@ public void AddConsole_MaxQueueLengthSetToNegativeOrZero_Throws(int invalidMaxQu
378386
}
379387

380388
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
389+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
381390
public void AddConsole_MaxQueueLengthLargerThanZero_ConfiguredProperly()
382391
{
383392
var configs = new[] {
@@ -399,6 +408,7 @@ public void AddConsole_MaxQueueLengthLargerThanZero_ConfiguredProperly()
399408
}
400409

401410
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
411+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
402412
public void AddConsole_NullFormatterName_UsingSystemdFormat_IgnoreFormatterOptionsAndUseDeprecatedInstead()
403413
{
404414
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
@@ -431,6 +441,7 @@ public void AddConsole_NullFormatterName_UsingSystemdFormat_IgnoreFormatterOptio
431441
}
432442

433443
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
444+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
434445
public void AddConsole_NullFormatterName_UsingDefaultFormat_IgnoreFormatterOptionsAndUseDeprecatedInstead()
435446
{
436447
var configuration = new ConfigurationBuilder().AddInMemoryCollection(new[] {
@@ -470,6 +481,7 @@ public void AddConsole_NullFormatterName_UsingDefaultFormat_IgnoreFormatterOptio
470481
}
471482

472483
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
484+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
473485
[InlineData("missingFormatter")]
474486
[InlineData("simple")]
475487
[InlineData("Simple")]
@@ -513,6 +525,7 @@ public void AddConsole_FormatterNameIsSet_UsingDefaultFormat_IgnoreDeprecatedAnd
513525
}
514526

515527
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
528+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
516529
[InlineData("missingFormatter")]
517530
[InlineData("systemd")]
518531
[InlineData("Systemd")]

src/libraries/Microsoft.Extensions.Logging.Console/tests/Microsoft.Extensions.Logging.Console.Tests/ConsoleLoggerProcessorTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public class ConsoleLoggerProcessorTests
1515
private const string _loggerName = "test";
1616

1717
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
18+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
1819
public void LogAfterDisposeWritesLog()
1920
{
2021
// Arrange
@@ -63,6 +64,7 @@ public void LogsFlushedAfterDispose()
6364
}
6465

6566
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
67+
[ActiveIssue("https://github.com/dotnet/runtime/issues/91538", typeof(PlatformDetection), nameof(PlatformDetection.IsWasmThreadingSupported))]
6668
[InlineData(-1)]
6769
[InlineData(0)]
6870
public static void MaxQueueLength_SetInvalid_Throws(int invalidMaxQueueLength)

0 commit comments

Comments
 (0)