@@ -1006,9 +1006,14 @@ public async Task CheckStdoutWithLargeWrites_TestSink(string mode)
1006
1006
1007
1007
StopServer ( ) ;
1008
1008
1009
- var expectedString = new string ( 'a' , 30000 ) ;
1010
- Assert . Contains ( TestSink . Writes , context => context . Message . Contains ( expectedString ) ) ;
1011
- EventLogHelpers . VerifyEventLogEvent ( deploymentResult , EventLogHelpers . InProcessThreadExitStdOut ( deploymentResult , "12" , expectedString ) , Logger ) ;
1009
+ // Logs can be split due to the ANCM logging occuring at the same time as logs from the app, so check for a portion of the
1010
+ // string instead of the entire string. The entire string will still be present in the event log.
1011
+ var expectedLogString = new string ( 'a' , 16 ) ;
1012
+
1013
+ Assert . Contains ( TestSink . Writes , context => context . Message . Contains ( expectedLogString ) ) ;
1014
+ var expectedEventLogString = new string ( 'a' , 30000 ) ;
1015
+
1016
+ EventLogHelpers . VerifyEventLogEvent ( deploymentResult , EventLogHelpers . InProcessThreadExitStdOut ( deploymentResult , "12" , expectedEventLogString ) , Logger ) ;
1012
1017
}
1013
1018
1014
1019
[ ConditionalTheory ]
@@ -1027,10 +1032,16 @@ public async Task CheckStdoutWithLargeWrites_LogFile(string mode)
1027
1032
await AssertFailsToStart ( deploymentResult ) ;
1028
1033
1029
1034
var contents = GetLogFileContent ( deploymentResult ) ;
1030
- var expectedString = new string ( 'a' , 30000 ) ;
1031
1035
1032
- Assert . Contains ( expectedString , contents ) ;
1033
- EventLogHelpers . VerifyEventLogEvent ( deploymentResult , EventLogHelpers . InProcessThreadExitStdOut ( deploymentResult , "12" , expectedString ) , Logger ) ;
1036
+ // Logs can be split due to the ANCM logging occuring at the same time as logs from the app, so check for a portion of the
1037
+ // string instead of the entire string. The entire string will still be present in the event log.
1038
+ var expectedLogString = new string ( 'a' , 16 ) ;
1039
+
1040
+ Assert . Contains ( expectedLogString , contents ) ;
1041
+
1042
+ var expectedEventLogString = new string ( 'a' , 30000 ) ;
1043
+
1044
+ EventLogHelpers . VerifyEventLogEvent ( deploymentResult , EventLogHelpers . InProcessThreadExitStdOut ( deploymentResult , "12" , expectedEventLogString ) , Logger ) ;
1034
1045
}
1035
1046
1036
1047
[ ConditionalFact ]
@@ -1202,7 +1213,7 @@ private async Task AuthHeaderEnvironmentVariableRemoved(HostingModel hostingMode
1202
1213
var deploymentParameters = Fixture . GetBaseDeploymentParameters ( hostingModel ) ;
1203
1214
deploymentParameters . WebConfigBasedEnvironmentVariables [ "ASPNETCORE_IIS_HTTPAUTH" ] = "shouldberemoved" ;
1204
1215
1205
- Assert . DoesNotContain ( "shouldberemoved" , await GetStringAsync ( deploymentParameters , "/GetEnvironmentVariable?name=ASPNETCORE_IIS_HTTPAUTH" ) ) ;
1216
+ Assert . DoesNotContain ( "shouldberemoved" , await GetStringAsync ( deploymentParameters , "/GetEnvironmentVariable?name=ASPNETCORE_IIS_HTTPAUTH" ) ) ;
1206
1217
}
1207
1218
1208
1219
[ ConditionalFact ]
@@ -1314,7 +1325,8 @@ public async Task ServerAddressesIncludesBaseAddress()
1314
1325
deploymentParameters . AddHttpsToServerConfig ( ) ;
1315
1326
deploymentParameters . SetWindowsAuth ( false ) ;
1316
1327
deploymentParameters . AddServerConfigAction (
1317
- ( element , root ) => {
1328
+ ( element , root ) =>
1329
+ {
1318
1330
element . Descendants ( "site" ) . Single ( ) . Element ( "application" ) . SetAttributeValue ( "path" , "/" + appName ) ;
1319
1331
Helpers . CreateEmptyApplication ( element , root ) ;
1320
1332
} ) ;
@@ -1332,7 +1344,8 @@ public async Task AncmHttpsPortCanBeOverriden()
1332
1344
var deploymentParameters = Fixture . GetBaseDeploymentParameters ( HostingModel . OutOfProcess ) ;
1333
1345
1334
1346
deploymentParameters . AddServerConfigAction (
1335
- element => {
1347
+ element =>
1348
+ {
1336
1349
element . Descendants ( "bindings" )
1337
1350
. Single ( )
1338
1351
. GetOrAdd ( "binding" , "protocol" , "https" )
@@ -1358,7 +1371,8 @@ public async Task HttpsRedirectionWorksIn30AndNot22()
1358
1371
deploymentParameters . ApplicationBaseUriHint = $ "http://localhost:{ TestPortHelper . GetNextPort ( ) } /";
1359
1372
1360
1373
deploymentParameters . AddServerConfigAction (
1361
- element => {
1374
+ element =>
1375
+ {
1362
1376
element . Descendants ( "bindings" )
1363
1377
. Single ( )
1364
1378
. AddAndGetInnerElement ( "binding" , "protocol" , "https" )
@@ -1403,7 +1417,8 @@ public async Task MultipleHttpsPortsProduceNoEnvVar()
1403
1417
var deploymentParameters = Fixture . GetBaseDeploymentParameters ( HostingModel . OutOfProcess ) ;
1404
1418
1405
1419
deploymentParameters . AddServerConfigAction (
1406
- element => {
1420
+ element =>
1421
+ {
1407
1422
element . Descendants ( "bindings" )
1408
1423
. Single ( )
1409
1424
. Add (
0 commit comments