@@ -45,7 +45,7 @@ protected async Task SpaTemplateImplAsync(
45
45
{
46
46
Project = await ProjectFactory . GetOrCreateProject ( key , Output ) ;
47
47
48
- var createResult = await Project . RunDotNetNewAsync ( template , auth : usesAuth ? "Individual" : null , language : null , useLocalDb ) ;
48
+ using var createResult = await Project . RunDotNetNewAsync ( template , auth : usesAuth ? "Individual" : null , language : null , useLocalDb ) ;
49
49
Assert . True ( 0 == createResult . ExitCode , ErrorMessages . GetFailedProcessMessage ( "create/restore" , Project , createResult ) ) ;
50
50
51
51
// We shouldn't have to do the NPM restore in tests because it should happen
@@ -61,40 +61,40 @@ protected async Task SpaTemplateImplAsync(
61
61
Assert . Contains ( ".db" , projectFileContents ) ;
62
62
}
63
63
64
- var npmRestoreResult = await Project . RestoreWithRetryAsync ( Output , clientAppSubdirPath ) ;
64
+ using var npmRestoreResult = await Project . RestoreWithRetryAsync ( Output , clientAppSubdirPath ) ;
65
65
Assert . True ( 0 == npmRestoreResult . ExitCode , ErrorMessages . GetFailedProcessMessage ( "npm restore" , Project , npmRestoreResult ) ) ;
66
66
67
- var lintResult = await ProcessEx . RunViaShellAsync ( Output , clientAppSubdirPath , "npm run lint" ) ;
67
+ using var lintResult = await ProcessEx . RunViaShellAsync ( Output , clientAppSubdirPath , "npm run lint" ) ;
68
68
Assert . True ( 0 == lintResult . ExitCode , ErrorMessages . GetFailedProcessMessage ( "npm run lint" , Project , lintResult ) ) ;
69
69
70
70
if ( template == "react" || template == "reactredux" )
71
71
{
72
- var testResult = await ProcessEx . RunViaShellAsync ( Output , clientAppSubdirPath , "npm run test" ) ;
72
+ using var testResult = await ProcessEx . RunViaShellAsync ( Output , clientAppSubdirPath , "npm run test" ) ;
73
73
Assert . True ( 0 == testResult . ExitCode , ErrorMessages . GetFailedProcessMessage ( "npm run test" , Project , testResult ) ) ;
74
74
}
75
75
76
- var publishResult = await Project . RunDotNetPublishAsync ( ) ;
76
+ using var publishResult = await Project . RunDotNetPublishAsync ( ) ;
77
77
Assert . True ( 0 == publishResult . ExitCode , ErrorMessages . GetFailedProcessMessage ( "publish" , Project , publishResult ) ) ;
78
78
79
79
// Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release
80
80
// The output from publish will go into bin/Release/netcoreapp3.0/publish and won't be affected by calling build
81
81
// later, while the opposite is not true.
82
82
83
- var buildResult = await Project . RunDotNetBuildAsync ( ) ;
83
+ using var buildResult = await Project . RunDotNetBuildAsync ( ) ;
84
84
Assert . True ( 0 == buildResult . ExitCode , ErrorMessages . GetFailedProcessMessage ( "build" , Project , buildResult ) ) ;
85
85
86
86
// localdb is not installed on the CI machines, so skip it.
87
87
var shouldVisitFetchData = ! useLocalDb ;
88
88
89
89
if ( usesAuth )
90
90
{
91
- var migrationsResult = await Project . RunDotNetEfCreateMigrationAsync ( template ) ;
91
+ using var migrationsResult = await Project . RunDotNetEfCreateMigrationAsync ( template ) ;
92
92
Assert . True ( 0 == migrationsResult . ExitCode , ErrorMessages . GetFailedProcessMessage ( "run EF migrations" , Project , migrationsResult ) ) ;
93
93
Project . AssertEmptyMigration ( template ) ;
94
94
95
95
if ( shouldVisitFetchData )
96
96
{
97
- var dbUpdateResult = await Project . RunDotNetEfUpdateDatabaseAsync ( ) ;
97
+ using var dbUpdateResult = await Project . RunDotNetEfUpdateDatabaseAsync ( ) ;
98
98
Assert . True ( 0 == dbUpdateResult . ExitCode , ErrorMessages . GetFailedProcessMessage ( "update database" , Project , dbUpdateResult ) ) ;
99
99
}
100
100
}
@@ -247,7 +247,7 @@ private void TestBasicNavigation(bool visitFetchData, bool usesAuth, IWebDriver
247
247
browser . Equal ( "Weather forecast" , ( ) => browser . FindElement ( By . TagName ( "h1" ) ) . Text ) ;
248
248
249
249
// Asynchronously loads and displays the table of weather forecasts
250
- browser . Exists ( By . CssSelector ( "table>tbody>tr" ) ) ;
250
+ browser . Exists ( By . CssSelector ( "table>tbody>tr" ) , TimeSpan . FromSeconds ( 10 ) ) ;
251
251
browser . Equal ( 5 , ( ) => browser . FindElements ( By . CssSelector ( "p+table>tbody>tr" ) ) . Count ) ;
252
252
}
253
253
0 commit comments