Quarantine some tests (#19932)

This commit is contained in:
Brennan 2020-03-17 16:31:24 -07:00 committed by GitHub
parent ae192af856
commit 9112030a3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 11 deletions

View File

@ -9,6 +9,7 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Server; using Microsoft.AspNetCore.Components.Server;
using Microsoft.AspNetCore.Testing;
using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Logging.Abstractions;
using Xunit; using Xunit;
@ -184,7 +185,8 @@ namespace Microsoft.AspNetCore.Components
} }
[Fact] [Fact]
public async Task IfValidateAuthenticationStateAsyncReturnsUnrelatedCancelledTask_TreatAsFailure() [QuarantinedTest]
public async Task IfValidateAuthenticationStateAsyncReturnsUnrelatedCanceledTask_TreatAsFailure()
{ {
// Arrange // Arrange
var validationTcs = new TaskCompletionSource<bool>(); var validationTcs = new TaskCompletionSource<bool>();
@ -200,11 +202,11 @@ namespace Microsoft.AspNetCore.Components
var firstRevalidationCall = provider.RevalidationCallLog.Single(); var firstRevalidationCall = provider.RevalidationCallLog.Single();
Assert.Equal(0, authenticationStateChangedCount); Assert.Equal(0, authenticationStateChangedCount);
// Act: ValidateAuthenticationStateAsync returns cancelled task, but the cancellation // Act: ValidateAuthenticationStateAsync returns canceled task, but the cancellation
// is unrelated to the CT we supplied // is unrelated to the CT we supplied
validationTcs.TrySetCanceled(new CancellationTokenSource().Token); validationTcs.TrySetCanceled(new CancellationTokenSource().Token);
// Assert: Since we didn't ask for that operation to be cancelled, this is treated as // Assert: Since we didn't ask for that operation to be canceled, this is treated as
// a failure to validate, so we force a logout // a failure to validate, so we force a logout
Assert.Equal(1, authenticationStateChangedCount); Assert.Equal(1, authenticationStateChangedCount);
var newAuthState = await provider.GetAuthenticationStateAsync(); var newAuthState = await provider.GetAuthenticationStateAsync();

View File

@ -274,6 +274,7 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
} }
[Fact] [Fact]
[QuarantinedTest]
public async Task RunAsync_PublishersCanTimeout() public async Task RunAsync_PublishersCanTimeout()
{ {
// Arrange // Arrange

View File

@ -887,6 +887,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
} }
[Fact] [Fact]
[QuarantinedTest]
public async Task ProcessAsync_AwaitersUseTheResultOfExecutor() public async Task ProcessAsync_AwaitersUseTheResultOfExecutor()
{ {
// Arrange // Arrange

View File

@ -30,7 +30,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests
#endif #endif
[ConditionalFact] [ConditionalFact]
[CollectDump] [CollectDump]
[QuarantinedTest]
public async Task TestUnixDomainSocket() public async Task TestUnixDomainSocket()
{ {
var path = Path.GetTempFileName(); var path = Path.GetTempFileName();

View File

@ -3660,6 +3660,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
[Theory] [Theory]
[InlineData(true)] [InlineData(true)]
[InlineData(false)] [InlineData(false)]
[QuarantinedTest]
public async Task CONTINUATION_Received_WithTrailers_Available(bool sendData) public async Task CONTINUATION_Received_WithTrailers_Available(bool sendData)
{ {
await InitializeConnectionAsync(_readTrailersApplication); await InitializeConnectionAsync(_readTrailersApplication);

View File

@ -197,17 +197,18 @@ namespace Microsoft.Extensions.SecretManager.Tools.Tests
} }
[Fact] [Fact]
[QuarantinedTest]
public void Remove_Is_Case_Insensitive() public void Remove_Is_Case_Insensitive()
{ {
var projectPath = _fixture.GetTempSecretProject(); var projectPath = _fixture.GetTempSecretProject();
var secretManager = CreateProgram(); var secretManager = CreateProgram();
secretManager.RunInternal("set", "SeCreT1", "value", "-p", projectPath); secretManager.RunInternal("set", "SeCreT1", "value", "-p", projectPath, "--verbose");
secretManager.RunInternal("list", "-p", projectPath); secretManager.RunInternal("list", "-p", projectPath, "--verbose");
Assert.Contains("SeCreT1 = value", _console.GetOutput()); Assert.Contains("SeCreT1 = value", _console.GetOutput());
secretManager.RunInternal("remove", "secret1", "-p", projectPath); secretManager.RunInternal("remove", "secret1", "-p", projectPath, "--verbose");
_console.ClearOutput(); _console.ClearOutput();
secretManager.RunInternal("list", "-p", projectPath); secretManager.RunInternal("list", "-p", projectPath, "--verbose");
Assert.Contains(Resources.Error_No_Secrets_Found, _console.GetOutput()); Assert.Contains(Resources.Error_No_Secrets_Found, _console.GetOutput());
} }