Skip to content

Commit c483725

Browse files
author
Stanislav Idolov
authored
ENGCOM-2617: [Backport] Filter test result collection with the cron job code defined in the c… #17192
2 parents 83044ca + 0a13675 commit c483725

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dev/tests/integration/testsuite/Magento/Cron/Observer/ProcessCronQueueObserverTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@ protected function setUp()
2727
}
2828

2929
/**
30-
* @magentoConfigFixture current_store crontab/default/jobs/catalog_product_alert/schedule/cron_expr 8 * * * *
30+
* @magentoConfigFixture current_store crontab/default/jobs/catalog_product_alert/schedule/cron_expr * * * * *
3131
*/
3232
public function testDispatchScheduled()
3333
{
3434
$collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
3535
'Magento\Cron\Model\ResourceModel\Schedule\Collection'
3636
);
3737
$collection->addFieldToFilter('status', \Magento\Cron\Model\Schedule::STATUS_PENDING);
38+
$collection->addFieldToFilter('job_code', 'catalog_product_alert');
3839
$this->assertGreaterThan(0, $collection->count(), 'Cron has failed to schedule tasks for itself for future.');
3940
}
4041

0 commit comments

Comments
 (0)