[BRT] Mitigating flaky SignalR tests (#8423)

* add the ability to skip c++ tests and skip signalr one (mitigates #8421)
This commit is contained in:
Andrew Stanton-Nurse 2019-03-12 12:33:54 -07:00 committed by GitHub
parent 5efa1ba0b9
commit 61a9964a15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -13,6 +13,7 @@
<Target Name="Restore" />
<Target Name="ResolveNuGetPackageAssets" />
<Target Name="Test" Condition="'$(IsTestProject)' == 'true'" >
<Exec Command="&quot;$(TargetPath)&quot;" />
<Warning Condition="'$(TestProjectSkipReason)' != ''" Text="Skipped $(MSBuildProjectFileName): $(TestProjectSkipReason)" />
<Exec Condition="'$(TestProjectSkipReason)' == ''" Command="&quot;$(TargetPath)&quot;" />
</Target>
</Project>

View File

@ -95,5 +95,6 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<PropertyGroup>
<IsTestProject>true</IsTestProject>
<TestProjectSkipReason>Flaky, due to https://github.com/aspnet/AspNetCore/issues/8421</TestProjectSkipReason>
</PropertyGroup>
</Project>

View File

@ -455,7 +455,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests
var cts = new CancellationTokenSource();
cts.Cancel();
await Assert.ThrowsAnyAsync<OperationCanceledException>(() =>connection.StreamAsChannelAsync<int>("Stream", 5, cts.Token).OrTimeout());
await Assert.ThrowsAnyAsync<OperationCanceledException>(() => connection.StreamAsChannelAsync<int>("Stream", 5, cts.Token).OrTimeout());
}
catch (Exception ex)
{