99 using NServiceBus ;
1010 using NServiceBus . AcceptanceTesting ;
1111 using NUnit . Framework ;
12+ using Operations ;
1213 using ServiceBus . Management . Infrastructure . Settings ;
1314
1415 [ TestFixture ]
@@ -33,7 +34,7 @@ await Define<ScenarioContext>()
3334 . WithEndpoint < Sender > ( b => b
3435 . When ( context =>
3536 {
36- return context . Logs . ToArray ( ) . Any ( i => i . Message . StartsWith ( "Ensure started. Infrastructure started" ) ) ;
37+ return context . Logs . ToArray ( ) . Any ( i => i . Message . StartsWith ( ErrorIngestion . LogMessages . StoppedInfrastructure ) ) ;
3738 } , ( _ , __ ) =>
3839 {
3940 PersisterSettings . MinimumStorageLeftRequiredForIngestion = 100 ;
@@ -43,8 +44,7 @@ await Define<ScenarioContext>()
4344 . When ( context =>
4445 {
4546 return context . Logs . ToArray ( ) . Any ( i =>
46- i . Message . StartsWith (
47- "Shutting down due to failed persistence health check. Infrastructure shut down completed" ) ) ;
47+ i . Message . StartsWith ( ErrorIngestion . LogMessages . StoppedInfrastructure ) ) ;
4848 } , ( bus , c ) => bus . SendLocal ( new MyMessage ( ) )
4949 )
5050 . DoNotFailOnErrorMessages ( ) )
@@ -62,8 +62,7 @@ await Define<ScenarioContext>()
6262 . When ( context =>
6363 {
6464 return context . Logs . ToArray ( ) . Any ( i =>
65- i . Message . StartsWith (
66- "Ensure started. Infrastructure started" ) ) ;
65+ i . Message . StartsWith ( ErrorIngestion . LogMessages . StartedInfrastructure ) ) ;
6766 } , ( session , context ) =>
6867 {
6968 PersisterSettings . MinimumStorageLeftRequiredForIngestion = 100 ;
@@ -73,8 +72,7 @@ await Define<ScenarioContext>()
7372 . When ( context =>
7473 {
7574 ingestionShutdown = context . Logs . ToArray ( ) . Any ( i =>
76- i . Message . StartsWith (
77- "Shutting down due to failed persistence health check. Infrastructure shut down completed" ) ) ;
75+ i . Message . StartsWith ( ErrorIngestion . LogMessages . StoppedInfrastructure ) ) ;
7876
7977 return ingestionShutdown ;
8078 } ,
0 commit comments