Skip to content

Quarantine some tests #19932

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

Merged
merged 2 commits into from
Mar 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -9,6 +9,7 @@
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;

Expand Down Expand Up @@ -184,7 +185,8 @@ public async Task SuppliesCancellationTokenThatSignalsWhenRevalidationLoopIsBein
}

[Fact]
public async Task IfValidateAuthenticationStateAsyncReturnsUnrelatedCancelledTask_TreatAsFailure()
[QuarantinedTest]
public async Task IfValidateAuthenticationStateAsyncReturnsUnrelatedCanceledTask_TreatAsFailure()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran into this flaky test while working on #10759 and have created an issue for it under #19940.

{
// Arrange
var validationTcs = new TaskCompletionSource<bool>();
Expand All @@ -200,11 +202,11 @@ public async Task IfValidateAuthenticationStateAsyncReturnsUnrelatedCancelledTas
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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public async Task StopAsync_CancelsExecution()
};

var service = CreateService(publishers);

try
{
await service.StartAsync();
Expand Down Expand Up @@ -214,7 +214,7 @@ public async Task RunAsync_WaitsForCompletion_Single()
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); });
Expand Down Expand Up @@ -274,6 +274,7 @@ public async Task RunAsync_WaitsForCompletion_Multiple()
}

[Fact]
[QuarantinedTest]
public async Task RunAsync_PublishersCanTimeout()
{
// Arrange
Expand Down Expand Up @@ -440,7 +441,7 @@ public async Task RunAsync_HandlesExceptions_Multiple()
}

private HealthCheckPublisherHostedService CreateService(
IHealthCheckPublisher[] publishers,
IHealthCheckPublisher[] publishers,
Action<HealthCheckPublisherOptions> configure = null,
TestSink sink = null)
{
Expand Down
1 change: 1 addition & 0 deletions src/Mvc/Mvc.TagHelpers/test/CacheTagHelperTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@ public async Task ProcessAsync_ThrowsExceptionForAwaiters_IfExecutorEncountersAn
}

[Fact]
[QuarantinedTest]
public async Task ProcessAsync_AwaitersUseTheResultOfExecutor()
{
// Arrange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public class UnixDomainSocketsTest : TestApplicationErrorLoggerLoggedTest
#endif
[ConditionalFact]
[CollectDump]
[QuarantinedTest]
public async Task TestUnixDomainSocket()
{
var path = Path.GetTempFileName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3660,6 +3660,7 @@ await ExpectAsync(Http2FrameType.HEADERS,
[Theory]
[InlineData(true)]
[InlineData(false)]
[QuarantinedTest]
public async Task CONTINUATION_Received_WithTrailers_Available(bool sendData)
{
await InitializeConnectionAsync(_readTrailersApplication);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public class H2SpecTests : LoggedTest
{
[ConditionalTheory]
[MemberData(nameof(H2SpecTestCases))]
[QuarantinedTest("https://github.com/dotnet/aspnetcore-internal/issues/2225")]
public async Task RunIndividualTestCase(H2SpecTestCase testCase)
{
var hostBuilder = new WebHostBuilder()
Expand Down
9 changes: 5 additions & 4 deletions src/Tools/dotnet-user-secrets/test/SecretManagerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,18 @@ public void Remove_Non_Existing_Secret()
}

[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());
}
Expand Down