Skip to content

Commit 2121aa3

Browse files
committed
ACP2E-2101: Admin dashboard slowness
1 parent b5166d0 commit 2121aa3

File tree

1 file changed

+40
-0
lines changed
  • dev/tests/integration/testsuite/Magento/Search/Model/ResourceModel/Query

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Search\Model\ResourceModel\Query;
9+
10+
use Magento\Search\Model\ResourceModel\Query;
11+
use Magento\Framework\ObjectManagerInterface;
12+
use Magento\TestFramework\Helper\Bootstrap;
13+
use PHPUnit\Framework\TestCase;
14+
use Magento\Framework\DB\Adapter\Pdo\Mysql;
15+
16+
class CollectionTest extends \PHPUnit\Framework\TestCase
17+
{
18+
/**
19+
* @var Query
20+
*/
21+
private $queryResource;
22+
23+
/**
24+
* @inheritDoc
25+
*/
26+
protected function setUp(): void
27+
{
28+
$objectManager = Bootstrap::getObjectManager();
29+
$this->queryResource = $objectManager->get(Query::class);
30+
}
31+
32+
public function testSearchQueryTableHasProperIndex()
33+
{
34+
$table = $this->queryResource->getTable('search_query');
35+
$indexName = 'SEARCH_QUERY_STORE_ID_NUM_RESULTS_POPULARITY';
36+
$connection = $this->queryResource->getConnection();
37+
$tableIndexes = $connection->getIndexList($table);
38+
$this->assertArrayHasKey($indexName, $tableIndexes);
39+
}
40+
}

0 commit comments

Comments
 (0)