Skip to content

Commit

Permalink
HSEARCH-4531 Skip some field-based sort tests on versions of Elastics…
Browse files Browse the repository at this point in the history
…earch that cannot make them work
  • Loading branch information
yrodiere committed Apr 5, 2022
1 parent a9a84cd commit 89cf948
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -8,6 +8,7 @@

import static org.hibernate.search.integrationtest.backend.tck.testsupport.types.values.AscendingUniqueDistanceFromCenterValues.CENTER_POINT;
import static org.hibernate.search.util.impl.integrationtest.common.assertion.SearchResultAssert.assertThatQuery;
import static org.junit.Assume.assumeTrue;

import java.util.function.Function;

Expand All @@ -20,6 +21,7 @@
import org.hibernate.search.engine.search.sort.dsl.SortFinalStep;
import org.hibernate.search.integrationtest.backend.tck.testsupport.types.GeoPointFieldTypeDescriptor;
import org.hibernate.search.integrationtest.backend.tck.testsupport.types.values.AscendingUniqueDistanceFromCenterValues;
import org.hibernate.search.integrationtest.backend.tck.testsupport.util.TckConfiguration;
import org.hibernate.search.integrationtest.backend.tck.testsupport.util.rule.SearchSetupHelper;
import org.hibernate.search.util.impl.integrationtest.mapper.stub.BulkIndexer;
import org.hibernate.search.util.impl.integrationtest.mapper.stub.SimpleMappedIndex;
Expand Down Expand Up @@ -72,6 +74,11 @@ public void simple() {
@Test
@TestForIssue(jiraKey = "HSEARCH-4531")
public void neverPopulated() {
assumeTrue(
"This backend doesn't support distance sorts on a field that is missing from some of the target indexes.",
TckConfiguration.get().getBackendFeatures().supportsDistanceSortWhenFieldMissingInSomeTargetIndexes()
);

String neverPopulatedFieldPath = neverPopulatedFieldPath();
String mainFieldPath = mainFieldPath();

Expand Down

0 comments on commit 89cf948

Please sign in to comment.