@@ -99,8 +99,7 @@ public function testIndexingWithInheritanceAsynchronous()
99
99
$ child = $ this ->createChildObject ($ object );
100
100
$ indexName = $ this ->dataObjectTypeAdapter ->getAliasIndexName ($ object ->getClass ());
101
101
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 ();
104
103
105
104
// check indexed
106
105
$ this ->assertGreaterThan (
@@ -127,8 +126,7 @@ public function testIndexingWithInheritanceAsynchronousNoInheritance()
127
126
$ child = $ this ->createChildObject ($ object );
128
127
$ indexName = $ this ->dataObjectTypeAdapter ->getAliasIndexName ($ object ->getClass ());
129
128
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 ();
132
130
133
131
// check indexed
134
132
$ this ->assertGreaterThan (
@@ -181,8 +179,7 @@ public function testIndexingWithoutInheritanceAsynchronous()
181
179
$ this ->assertFalse ($ object ->getClass ()->getAllowInherit ());
182
180
$ indexName = $ this ->dataObjectTypeAdapter ->getAliasIndexName ($ object ->getClass ());
183
181
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 ();
186
183
187
184
// check indexed
188
185
$ this ->assertGreaterThan (
@@ -226,8 +223,7 @@ public function testFolderIndexingAsynchronous()
226
223
$ object ->setKey ('my-test-folder ' );
227
224
$ object ->save ();
228
225
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 ();
231
227
232
228
$ this ->assertGreaterThan (
233
229
0 ,
0 commit comments