Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What concerns me here is execution permissions (0755) added to this file for no reason
image
It doesn't look like any other test has that set:
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's intentional change 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Original file line number Diff line number Diff line change
Expand Up @@ -1523,11 +1523,11 @@ public function providerForTestFind()
],
[
self::SETUP_DEDICATED => [
'searchHitIndex' => 2,
'searchHitIndex' => 1,
'preparedDataTestIndex' => 2,
],
self::SETUP_SHARED => [
'searchHitIndex' => 2,
'searchHitIndex' => 1,
'preparedDataTestIndex' => 2,
],
self::SETUP_SINGLE => [
Expand All @@ -1551,11 +1551,11 @@ public function providerForTestFind()
],
[
self::SETUP_DEDICATED => [
'searchHitIndex' => 1,
'searchHitIndex' => 2,
'preparedDataTestIndex' => 2,
],
self::SETUP_SHARED => [
'searchHitIndex' => 1,
'searchHitIndex' => 2,
'preparedDataTestIndex' => 2,
],
self::SETUP_SINGLE => [
Expand Down Expand Up @@ -1591,8 +1591,8 @@ public function providerForTestFind()
],
[
self::SETUP_DEDICATED => [
'searchHitIndex' => 2,
'preparedDataTestIndex' => 2,
'searchHitIndex' => 0,
'preparedDataTestIndex' => 1,
],
self::SETUP_SHARED => [
'searchHitIndex' => 0,
Expand All @@ -1619,11 +1619,11 @@ public function providerForTestFind()
],
[
self::SETUP_DEDICATED => [
'searchHitIndex' => 2,
'searchHitIndex' => 1,
'preparedDataTestIndex' => 2,
],
self::SETUP_SHARED => [
'searchHitIndex' => 2,
'searchHitIndex' => 1,
'preparedDataTestIndex' => 2,
],
self::SETUP_SINGLE => [
Expand All @@ -1647,11 +1647,11 @@ public function providerForTestFind()
],
[
self::SETUP_DEDICATED => [
'searchHitIndex' => 1,
'searchHitIndex' => 2,
'preparedDataTestIndex' => 2,
],
self::SETUP_SHARED => [
'searchHitIndex' => 1,
'searchHitIndex' => 2,
'preparedDataTestIndex' => 2,
],
self::SETUP_SINGLE => [
Expand Down Expand Up @@ -1725,6 +1725,7 @@ public function testFindContent(
'filter' => new Criterion\ContentTypeIdentifier('test-type'),
'sortClauses' => [
new SortClause\Field('test-type', 'sort_field'),
new SortClause\Field('test-type', 'search_field'),
],
];

Expand Down Expand Up @@ -1779,6 +1780,7 @@ public function testFindLocationsSingle(
),
'sortClauses' => [
new SortClause\Field('test-type', 'sort_field'),
new SortClause\Field('test-type', 'search_field'),
],
];

Expand Down Expand Up @@ -1829,6 +1831,7 @@ public function testFindLocationsMultiple(
'sortClauses' => [
new SortClause\Location\Depth(Query::SORT_ASC),
new SortClause\Field('test-type', 'sort_field'),
new SortClause\Field('test-type', 'search_field'),
],
];

Expand Down Expand Up @@ -1879,6 +1882,11 @@ public function testFindLocationsMultiple(

private function assertIndexName(array $indexMap, SearchHit $searchHit): void
{
if (!$this->isSolrInMaxVersion('9.3.0')) {
// In Solr 9.3.0 and later, the shard parameter is not used anymore.
return;
}

$indexName = $this->getIndexName($indexMap);

if ($indexName === null) {
Expand Down Expand Up @@ -1912,6 +1920,16 @@ private function getIndexesToMatchData(

return $indexesToMatchData;
}

private function isSolrInMaxVersion(string $maxVersion): bool
{
$version = getenv('SOLR_VERSION');
if (is_string($version) && !empty($version)) {
return version_compare($version, $maxVersion, '<');
}

return false;
}
}

class_alias(SearchServiceTranslationLanguageFallbackTest::class, 'eZ\Publish\API\Repository\Tests\SearchServiceTranslationLanguageFallbackTest');
Loading