aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-05-29 15:32:26 +0200
committerGitHub <noreply@github.com>2024-05-29 15:32:26 +0200
commit93b8364a488fd2ae10623a8d7d91cdb5e1e40d4a (patch)
treef443367afd433adba3abdb1d380c6f2a2e03049b /config-model/src/test/java
parent651ab0b6055d62a9b4215d0c35bb7f1e8346843f (diff)
parentad6fa8f9d5b9ba68779a2fe87faf5c71acfc0065 (diff)
Merge pull request #31333 from vespa-engine/hmusum/throw-if-document-summary-inherits-non-existen-summary
Add test showing that inheriting a non-existent document summary giveā€¦
Diffstat (limited to 'config-model/src/test/java')
-rw-r--r--config-model/src/test/java/com/yahoo/schema/processing/SummaryConsistencyTestCase.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/processing/SummaryConsistencyTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/SummaryConsistencyTestCase.java
index 9eca2106c5e..1184e49b381 100644
--- a/config-model/src/test/java/com/yahoo/schema/processing/SummaryConsistencyTestCase.java
+++ b/config-model/src/test/java/com/yahoo/schema/processing/SummaryConsistencyTestCase.java
@@ -5,6 +5,7 @@ import com.yahoo.schema.Schema;
import com.yahoo.schema.ApplicationBuilder;
import com.yahoo.schema.parser.ParseException;
import com.yahoo.vespa.documentmodel.SummaryTransform;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import static com.yahoo.config.model.test.TestUtil.joinLines;
@@ -42,4 +43,26 @@ public class SummaryConsistencyTestCase {
Schema schema = ApplicationBuilder.createFromString(sd).getSchema();
assertEquals(SummaryTransform.ATTRIBUTECOMBINER, schema.getSummaryField("elem_array_unfiltered").getTransform());
}
+
+ @Test
+ @Disabled
+ void testDocumentTypesWithInheritanceOfNonExistingField() throws ParseException {
+ String schemaString = """
+ schema foo {
+ document foo {
+ field foo type string {
+ indexing: summary
+ }
+ }
+ document-summary foo_summary inherits non-existent {
+ summary foo {
+ source: foo
+ }
+ }
+ }
+ """;
+ var schema = ApplicationBuilder.createFromString(schemaString).getSchema();
+ schema.getSummaryField("foo_summary");
+ }
+
}