diff options
Diffstat (limited to 'config-model/src/test/java/com/yahoo/schema/IncorrectSummaryTypesTestCase.java')
-rw-r--r-- | config-model/src/test/java/com/yahoo/schema/IncorrectSummaryTypesTestCase.java | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/IncorrectSummaryTypesTestCase.java b/config-model/src/test/java/com/yahoo/schema/IncorrectSummaryTypesTestCase.java index e58cce6472a..acc872f6798 100644 --- a/config-model/src/test/java/com/yahoo/schema/IncorrectSummaryTypesTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/IncorrectSummaryTypesTestCase.java @@ -2,10 +2,11 @@ package com.yahoo.schema; import com.yahoo.schema.parser.ParseException; -import org.junit.Test; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; /** * Tests importing a search definition with conflicting summary types * @@ -13,20 +14,20 @@ import static org.junit.Assert.fail; */ public class IncorrectSummaryTypesTestCase extends AbstractSchemaTestCase { @Test - public void testImportingIncorrect() throws ParseException { + void testImportingIncorrect() throws ParseException { try { ApplicationBuilder.createFromString( "search incorrectsummarytypes {\n" + - " document incorrectsummarytypes {\n" + - " field somestring type string {\n" + - " indexing: summary\n" + - " }\n" + - " }\n" + - " document-summary incorrect {\n" + - " summary somestring type int {\n" + - " }\n" + - " }\n" + - "}\n"); + " document incorrectsummarytypes {\n" + + " field somestring type string {\n" + + " indexing: summary\n" + + " }\n" + + " }\n" + + " document-summary incorrect {\n" + + " summary somestring type int {\n" + + " }\n" + + " }\n" + + "}\n"); fail("processing should have failed"); } catch (RuntimeException e) { assertEquals("'summary somestring type string' in 'destinations(default )' is inconsistent with 'summary somestring type int' in 'destinations(incorrect )': All declarations of the same summary field must have the same type", e.getMessage()); |