File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
dev/tests/integration/testsuite/Magento/Framework/MessageQueue/UseCase Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -66,14 +66,21 @@ protected function setUp(): void
66
66
*/
67
67
public function testWaitForMessages ()
68
68
{
69
- $ this ->assertArrayHasKey ('queue ' , $ this ->config );
70
- $ this ->assertArrayHasKey ('consumers_wait_for_messages ' , $ this ->config ['queue ' ]);
71
- $ this ->assertEquals (1 , $ this ->config ['queue ' ]['consumers_wait_for_messages ' ]);
69
+ $ this ->publisherConsumerController ->stopConsumers ();
70
+
71
+ $ config = $ this ->config ;
72
+ $ config ['queue ' ]['consumers_wait_for_messages ' ] = 1 ;
73
+ $ this ->writeConfig ($ config );
74
+
75
+ $ loadedConfig = $ this ->loadConfig ();
76
+ $ this ->assertArrayHasKey ('queue ' , $ loadedConfig );
77
+ $ this ->assertArrayHasKey ('consumers_wait_for_messages ' , $ loadedConfig ['queue ' ]);
78
+ $ this ->assertEquals (1 , $ loadedConfig ['queue ' ]['consumers_wait_for_messages ' ]);
72
79
73
80
foreach ($ this ->messages as $ message ) {
74
81
$ this ->publishMessage ($ message );
75
82
}
76
-
83
+ $ this -> publisherConsumerController -> startConsumers ();
77
84
$ this ->waitForAsynchronousResult (count ($ this ->messages ), $ this ->logFilePath );
78
85
79
86
foreach ($ this ->messages as $ item ) {
You can’t perform that action at this time.
0 commit comments