From: Dan Moseley Date: Fri, 7 May 2021 15:05:51 +0000 (-0700) Subject: Disable cache clearing S.CM.TC test from running in parallel (#52428) X-Git-Tag: submit/tizen/20210909.063632~1540 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=453502e6b8162aa40e96e68dfd0b7ef337cf90b4;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Disable cache clearing S.CM.TC test from running in parallel (#52428) --- diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/ReflectionCachesUpdateHandlerTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/ReflectionCachesUpdateHandlerTests.cs index c34174e..905a580 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/ReflectionCachesUpdateHandlerTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/ReflectionCachesUpdateHandlerTests.cs @@ -7,6 +7,7 @@ using Xunit; namespace System.ComponentModel.Tests { [SimpleUpdateTest] + [Collection("NoParallelTests")] // Clears the cache which disrupts concurrent tests public class ReflectionCachesUpdateHandlerTests { [Fact] @@ -15,7 +16,7 @@ namespace System.ComponentModel.Tests AttributeCollection ac1 = TypeDescriptor.GetAttributes(typeof(ReflectionCachesUpdateHandlerTests)); AttributeCollection ac2 = TypeDescriptor.GetAttributes(typeof(ReflectionCachesUpdateHandlerTests)); Assert.Equal(ac1.Count, ac2.Count); - Assert.Equal(1, ac1.Count); + Assert.Equal(2, ac1.Count); Assert.Same(ac1[0], ac2[0]); MethodInfo clearCache = typeof(TypeDescriptionProvider).Assembly.GetType("System.ComponentModel.ReflectionCachesUpdateHandler", throwOnError: true).GetMethod("ClearCache"); diff --git a/src/libraries/System.ComponentModel.TypeConverter/tests/TypeDescriptorTests.cs b/src/libraries/System.ComponentModel.TypeConverter/tests/TypeDescriptorTests.cs index 94d3a97..a142fe5 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/tests/TypeDescriptorTests.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/tests/TypeDescriptorTests.cs @@ -10,6 +10,7 @@ using Xunit; namespace System.ComponentModel.Tests { + [Collection("NoParallelTests")] // manipulates cache public class TypeDescriptorTests { [Fact]