Skip to content

Commit 0aac801

Browse files
committed
IBX-9845: Added test skipping for Solr doesn't support shard URL
1 parent 86c9c16 commit 0aac801

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php

100644100755
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1879,6 +1879,11 @@ public function testFindLocationsMultiple(
18791879

18801880
private function assertIndexName(array $indexMap, SearchHit $searchHit): void
18811881
{
1882+
if (!$this->isSolrInMaxVersion('9.3.0')) {
1883+
// In Solr 9.3.0 and later, the shard parameter is not used anymore.
1884+
return;
1885+
}
1886+
18821887
$indexName = $this->getIndexName($indexMap);
18831888

18841889
if ($indexName === null) {
@@ -1912,6 +1917,16 @@ private function getIndexesToMatchData(
19121917

19131918
return $indexesToMatchData;
19141919
}
1920+
1921+
private function isSolrInMaxVersion(string $maxVersion): bool
1922+
{
1923+
$version = getenv('SOLR_VERSION');
1924+
if (is_string($version) && !empty($version)) {
1925+
return version_compare($version, $maxVersion, '<');
1926+
}
1927+
1928+
return false;
1929+
}
19151930
}
19161931

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

0 commit comments

Comments
 (0)