@@ -99,8 +99,7 @@ public function testIndexingWithInheritanceAsynchronous()
9999 $ child = $ this ->createChildObject ($ object );
100100 $ indexName = $ this ->dataObjectTypeAdapter ->getAliasIndexName ($ object ->getClass ());
101101
102- //Since the queue is processed asynchronously we need to run the worker here
103- $ this ->tester ->runCommand ('messenger:consume ' , ['--limit ' =>2 ], ['pimcore_generic_data_index_queue ' ]);
102+ $ this ->tester ->consume ();
104103
105104 // check indexed
106105 $ this ->assertGreaterThan (
@@ -127,8 +126,7 @@ public function testIndexingWithInheritanceAsynchronousNoInheritance()
127126 $ child = $ this ->createChildObject ($ object );
128127 $ indexName = $ this ->dataObjectTypeAdapter ->getAliasIndexName ($ object ->getClass ());
129128
130- //Since the queue is processed asynchronously we need to run the worker here
131- $ this ->tester ->runCommand ('messenger:consume ' , ['--limit ' =>2 ], ['pimcore_generic_data_index_queue ' ]);
129+ $ this ->tester ->consume ();
132130
133131 // check indexed
134132 $ this ->assertGreaterThan (
@@ -181,8 +179,7 @@ public function testIndexingWithoutInheritanceAsynchronous()
181179 $ this ->assertFalse ($ object ->getClass ()->getAllowInherit ());
182180 $ indexName = $ this ->dataObjectTypeAdapter ->getAliasIndexName ($ object ->getClass ());
183181
184- //Since the queue is processed asynchronously we need to run the worker here
185- $ this ->tester ->runCommand ('messenger:consume ' , ['--limit ' =>2 ], ['pimcore_generic_data_index_queue ' ]);
182+ $ this ->tester ->consume ();
186183
187184 // check indexed
188185 $ this ->assertGreaterThan (
@@ -226,8 +223,7 @@ public function testFolderIndexingAsynchronous()
226223 $ object ->setKey ('my-test-folder ' );
227224 $ object ->save ();
228225
229- //Since the queue is processed asynchronously we need to run the worker here
230- $ this ->tester ->runCommand ('messenger:consume ' , ['--limit ' =>2 ], ['pimcore_generic_data_index_queue ' ]);
226+ $ this ->tester ->consume ();
231227
232228 $ this ->assertGreaterThan (
233229 0 ,
0 commit comments