From 16fa6b270f5ebe9e78e0d283a88f4f7ced71c35a Mon Sep 17 00:00:00 2001 From: Julie Tibshirani Date: Sun, 17 Jun 2018 21:42:42 -0700 Subject: [PATCH] Remove some cases in FieldTypeLookupTests that are no longer relevant. (#31381) --- .../index/mapper/FieldTypeLookupTests.java | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/index/mapper/FieldTypeLookupTests.java b/server/src/test/java/org/elasticsearch/index/mapper/FieldTypeLookupTests.java index 39753548ee3..4f1b908cae8 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/FieldTypeLookupTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/FieldTypeLookupTests.java @@ -32,8 +32,6 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; -import static org.hamcrest.Matchers.containsString; - public class FieldTypeLookupTests extends ESTestCase { public void testEmpty() { @@ -80,29 +78,6 @@ public class FieldTypeLookupTests extends ESTestCase { assertEquals(f2.fieldType(), lookup2.get("foo")); } - public void testAddExistingIndexName() { - MockFieldMapper f = new MockFieldMapper("foo"); - MockFieldMapper f2 = new MockFieldMapper("bar"); - FieldTypeLookup lookup = new FieldTypeLookup(); - lookup = lookup.copyAndAddAll("type1", newList(f)); - FieldTypeLookup lookup2 = lookup.copyAndAddAll("type2", newList(f2)); - - assertSame(f.fieldType(), lookup2.get("foo")); - assertSame(f2.fieldType(), lookup2.get("bar")); - assertEquals(2, size(lookup2.iterator())); - } - - public void testAddExistingFullName() { - MockFieldMapper f = new MockFieldMapper("foo"); - MockFieldMapper f2 = new MockFieldMapper("foo"); - FieldTypeLookup lookup = new FieldTypeLookup(); - try { - lookup.copyAndAddAll("type2", newList(f2)); - } catch (IllegalArgumentException e) { - assertThat(e.getMessage(), containsString("mapper [foo] has different [index_name]")); - } - } - public void testCheckCompatibilityMismatchedTypes() { FieldMapper f1 = new MockFieldMapper("foo"); FieldTypeLookup lookup = new FieldTypeLookup();