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 Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Server;
using Microsoft.AspNetCore.Testing;
using Microsoft.Extensions.Logging.Abstractions;
using Xunit;
@ -184,7 +185,8 @@ namespace Microsoft.AspNetCore.Components
}
[Fact]
public async Task IfValidateAuthenticationStateAsyncReturnsUnrelatedCancelledTask_TreatAsFailure()
[QuarantinedTest]
public async Task IfValidateAuthenticationStateAsyncReturnsUnrelatedCanceledTask_TreatAsFailure()
{
// Arrange
var validationTcs = new TaskCompletionSource<bool>();
@ -200,11 +202,11 @@ namespace Microsoft.AspNetCore.Components
var firstRevalidationCall = provider.RevalidationCallLog.Single();
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
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
Assert.Equal(1, authenticationStateChangedCount);
var newAuthState = await provider.GetAuthenticationStateAsync();

View File

@ -129,7 +129,7 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
};
var service = CreateService(publishers);
try
{
await service.StartAsync();
@ -214,7 +214,7 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
entry => { Assert.Contains(entry.EventId, new[] { DefaultHealthCheckService.EventIds.HealthCheckBegin, DefaultHealthCheckService.EventIds.HealthCheckEnd }); },
entry => { Assert.Contains(entry.EventId, new[] { DefaultHealthCheckService.EventIds.HealthCheckBegin, DefaultHealthCheckService.EventIds.HealthCheckEnd }); },
entry => { Assert.Equal(DefaultHealthCheckService.EventIds.HealthCheckEnd, entry.EventId); },
entry => { Assert.Equal(DefaultHealthCheckService.EventIds.HealthCheckProcessingEnd, entry.EventId); },
entry => { Assert.Equal(DefaultHealthCheckService.EventIds.HealthCheckProcessingEnd, entry.EventId); },
entry => { Assert.Equal(HealthCheckPublisherHostedService.EventIds.HealthCheckPublisherBegin, entry.EventId); },
entry => { Assert.Equal(HealthCheckPublisherHostedService.EventIds.HealthCheckPublisherEnd, entry.EventId); },
entry => { Assert.Equal(HealthCheckPublisherHostedService.EventIds.HealthCheckPublisherProcessingEnd, entry.EventId); });
@ -274,6 +274,7 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
}
[Fact]
[QuarantinedTest]
public async Task RunAsync_PublishersCanTimeout()
{
// Arrange
@ -440,7 +441,7 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks
}
private HealthCheckPublisherHostedService CreateService(
IHealthCheckPublisher[] publishers,
IHealthCheckPublisher[] publishers,
Action<HealthCheckPublisherOptions> configure = null,
TestSink sink = null)
{

View File

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

View File

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

View File

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

View File

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