Skip to content

Commit

Permalink
Skip redundant test
Browse files Browse the repository at this point in the history
  • Loading branch information
schmengler committed Dec 27, 2020
1 parent 555e4a2 commit b2f88bc
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions tests/Catalog/IndexerErrorsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ class IndexerErrorsTest extends TestCase
private static $indexIsScheduledOrig;

/**
* @deprecated the test should be removed in next release, but we should still keep the exception in case this
* happens again
* @magentoDataFixture Magento/Store/_files/second_website_with_two_stores.php
*/
public function testHelpfulErrorMessageForFulltextIndexSchedule()
{
$this->onlyRunFromMagento('2.3.0');
$this->markTestSkipped('Since Magento 2.3.6 / 2.4.1 these transaction exceptions do not occur anymore');
$this->expectException(\Exception::class);

try {
Expand Down Expand Up @@ -58,13 +60,4 @@ public static function disableReindexScheduleRollback()
$model = Bootstrap::getObjectManager()->get(IndexerRegistry::class)->get('catalogsearch_fulltext');
$model->setScheduled(self::$indexIsScheduledOrig);
}

private function onlyRunFromMagento($magentoVersion): void
{
/** @var ProductMetadataInterface $productMetadata */
$productMetadata = Bootstrap::getObjectManager()->get(ProductMetadataInterface::class);
if (version_compare($productMetadata->getVersion(), $magentoVersion, '<')) {
$this->markTestSkipped('Only relevant for Magento >= ' . $magentoVersion . '');
}
}
}

0 comments on commit b2f88bc

Please sign in to comment.