Merge pull request #23391 from nextcloud/fix/23245/fix-asynccommandbus-test-failure

Overwrite also the new command bus name to execute them in sync in th…
This commit is contained in:
Morris Jobke 2020-10-12 21:35:07 +02:00 committed by GitHub
commit 34463b0e1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,7 @@ use DOMNode;
use OC\Command\QueueBus;
use OC\Files\Filesystem;
use OC\Template\Base;
use OCP\Command\IBus;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\Defaults;
use OCP\IDBConnection;
@ -119,6 +120,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
// overwrite the command bus with one we can run ourselves
$this->commandBus = new QueueBus();
$this->overwriteService('AsyncCommandBus', $this->commandBus);
$this->overwriteService(IBus::class, $this->commandBus);
// detect database access
self::$wasDatabaseAllowed = true;