From ff61f86953cabfb7dc5f3b2b16d5172552fd835c Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 28 Jan 2022 22:34:46 -0800 Subject: [PATCH] (NFC) QueueTest - Extra cleanups and assertions. --- tests/phpunit/CRM/Queue/QueueTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/CRM/Queue/QueueTest.php b/tests/phpunit/CRM/Queue/QueueTest.php index b89319e7b1..8a9f25dcb9 100644 --- a/tests/phpunit/CRM/Queue/QueueTest.php +++ b/tests/phpunit/CRM/Queue/QueueTest.php @@ -27,13 +27,13 @@ class CRM_Queue_QueueTest extends CiviUnitTestCase { $queueSpecs[] = [ [ 'type' => 'Sql', - 'name' => 'test-queue', + 'name' => 'test-queue-sql', ], ]; $queueSpecs[] = [ [ 'type' => 'Memory', - 'name' => 'test-queue', + 'name' => 'test-queue-mem', ], ]; $queueSpecs[] = [ @@ -56,7 +56,7 @@ class CRM_Queue_QueueTest extends CiviUnitTestCase { public function tearDown(): void { CRM_Utils_Time::resetTime(); - $tablesToTruncate = ['civicrm_queue_item']; + $tablesToTruncate = ['civicrm_queue_item', 'civicrm_queue']; $this->quickCleanup($tablesToTruncate); parent::tearDown(); } @@ -68,7 +68,9 @@ class CRM_Queue_QueueTest extends CiviUnitTestCase { * @param $queueSpec */ public function testBasicUsage($queueSpec) { + $this->assertDBQuery(0, 'SELECT count(*) FROM civicrm_queue'); $this->queue = $this->queueService->create($queueSpec); + $this->assertDBQuery(0, 'SELECT count(*) FROM civicrm_queue'); $this->assertTrue($this->queue instanceof CRM_Queue_Queue); $this->queue->createItem([ -- 2.25.1