Fix SignalR Npm flakiness (#11450)

This commit is contained in:
Brennan 2019-06-26 20:52:52 -07:00 committed by GitHub
parent 7610ba3ef3
commit 585b57593c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 11 deletions

2
.gitignore vendored
View File

@ -39,4 +39,4 @@ modules/
launchSettings.json
msbuild.ProjectImports.zip
StyleCop.Cache
UpgradeLog.htm
UpgradeLog.htm

View File

@ -13,6 +13,11 @@
<_BackupPackageJson>$(IntermediateOutputPath)$(MSBuildProjectName).package.json.bak</_BackupPackageJson>
</PropertyGroup>
<ItemGroup>
<TSFiles Include="$(MSBuildProjectDirectory)\*\*.ts" />
<TSFiles Include="$(MSBuildProjectDirectory)\package.json" />
</ItemGroup>
<Target Name="_CheckForInvalidConfiguration">
<Error Text="Missing expected property: PackageId" Condition="'$(IsPackable)' != 'false' and '$(PackageId)' == ''" />
</Target>
@ -31,8 +36,14 @@
BuildInParallel="true" />
</Target>
<Target Name="Build" DependsOnTargets="PrepareForBuild;ResolveProjectReferences">
<Yarn Command="run build" Condition="'$(IsBuildable)' != 'false'" StandardOutputImportance="High" StandardErrorImportance="High" />
<Target Name="Build" DependsOnTargets="PrepareForBuild;ResolveProjectReferences;_Build" />
<Target Name="_Build"
Condition="'$(IsBuildable)' != 'false'"
Inputs="@(TSFiles)"
Outputs="$(BaseIntermediateOutputPath)\build-sentinel" >
<Yarn Command="run build" StandardOutputImportance="High" StandardErrorImportance="High" />
<WriteLinesToFile Overwrite="true" File="$(BaseIntermediateOutputPath)\build-sentinel" />
</Target>
<PropertyGroup>

View File

@ -3,17 +3,16 @@
<PropertyGroup>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<IsTestProject>true</IsTestProject>
<BrowserTestHostName Condition="'$(ContinuousIntegrationBuild)' == 'true'">sauce.local</BrowserTestHostName>
<_TestSauceArgs>--verbose --no-color --configuration $(Configuration) --sauce-user "$(SauceUser)" --sauce-key "$(SauceKey)"</_TestSauceArgs>
<_TestSauceArgs Condition="'$(BrowserTestHostName)' != ''">$(_TestSauceArgs) --use-hostname "$(BrowserTestHostName)"</_TestSauceArgs>
<NpmTestArgs Condition="'$(DailyTests)' != 'true'">run test:local --no-color --configuration $(Configuration)</NpmTestArgs>
<NpmTestArgs Condition="'$(DailyTests)' != 'true'">run test:inner --no-color --configuration $(Configuration)</NpmTestArgs>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="SignalR.Client.FunctionalTestApp.csproj" Condition="'$(BuildManaged)' == 'true'" />
<ProjectReference Include="..\signalr\signalr.npmproj" />
<ProjectReference Include="..\signalr-protocol-msgpack\signalr-protocol-msgpack.npmproj" />
<ProjectReference Include="SignalR.Client.FunctionalTestApp.csproj" />
<ProjectReference Include="..\client-ts.npmproj" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />

View File

@ -39,12 +39,13 @@
"preclean": "cd .. && yarn run build",
"clean": "node ../common/node_modules/rimraf/bin.js ./wwwroot/dist ./obj/js",
"prebuild": "yarn run clean && yarn install --mutex network",
"build": "yarn run build:lint && yarn run build:webpack",
"build": "yarn run build:inner",
"build:inner": "yarn run build:lint && yarn run build:webpack",
"build:lint": "node ../common/node_modules/tslint/bin/tslint -c ../tslint.json -p ./tsconfig.json",
"build:webpack": "node ../common/node_modules/webpack-cli/bin/cli.js",
"pretest": "yarn run build && dotnet build SignalR.Client.FunctionalTestApp.csproj",
"test": "tsc --noEmit && yarn run test:local",
"test:inner": "yarn run build && dotnet build SignalR.Client.FunctionalTestApp.csproj && yarn run test:local",
"test:inner": "yarn run build:inner && ts-node --project ./scripts/tsconfig.json ./scripts/run-tests.ts",
"test:local": "yarn run pretest && ts-node --project ./scripts/tsconfig.json ./scripts/run-tests.ts",
"test:all": "yarn run pretest && ts-node --project ./scripts/tsconfig.json ./scripts/run-tests.ts --all-browsers",
"test:sauce": "yarn run pretest && ts-node --project ./scripts/tsconfig.json ./scripts/run-tests.ts --sauce",

View File

@ -4,7 +4,7 @@
<PropertyGroup>
<IsPackable>false</IsPackable>
<IsBuildable>false</IsBuildable>
<IsTestProject>false</IsTestProject>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>