Skip to content

Commit 9654798

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

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php

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

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

18841888
if ($indexName === null) {
@@ -1912,6 +1916,16 @@ private function getIndexesToMatchData(
19121916

19131917
return $indexesToMatchData;
19141918
}
1919+
1920+
private function isSolrInMaxVersion(string $maxVersion): bool
1921+
{
1922+
$version = getenv('SOLR_VERSION');
1923+
if (is_string($version) && !empty($version)) {
1924+
return version_compare($version, $maxVersion, '<');
1925+
}
1926+
1927+
return false;
1928+
}
19151929
}
19161930

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

0 commit comments

Comments
 (0)