Skip to content

Commit 1c6171f

Browse files
committed
Remove some cases in FieldTypeLookupTests that are no longer relevant. (#31381)
(cherry picked from commit 16fa6b2)
1 parent a702ddc commit 1c6171f

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

server/src/test/java/org/elasticsearch/index/mapper/FieldTypeLookupTests.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
import java.util.Iterator;
3333
import java.util.List;
3434

35-
import static org.hamcrest.Matchers.containsString;
36-
3735
public class FieldTypeLookupTests extends ESTestCase {
3836

3937
public void testEmpty() {
@@ -85,29 +83,6 @@ public void testAddExistingField() {
8583
assertEquals(f2.fieldType(), lookup2.get("foo"));
8684
}
8785

88-
public void testAddExistingIndexName() {
89-
MockFieldMapper f = new MockFieldMapper("foo");
90-
MockFieldMapper f2 = new MockFieldMapper("bar");
91-
FieldTypeLookup lookup = new FieldTypeLookup();
92-
lookup = lookup.copyAndAddAll("type1", newList(f), randomBoolean());
93-
FieldTypeLookup lookup2 = lookup.copyAndAddAll("type2", newList(f2), randomBoolean());
94-
95-
assertSame(f.fieldType(), lookup2.get("foo"));
96-
assertSame(f2.fieldType(), lookup2.get("bar"));
97-
assertEquals(2, size(lookup2.iterator()));
98-
}
99-
100-
public void testAddExistingFullName() {
101-
MockFieldMapper f = new MockFieldMapper("foo");
102-
MockFieldMapper f2 = new MockFieldMapper("foo");
103-
FieldTypeLookup lookup = new FieldTypeLookup();
104-
try {
105-
lookup.copyAndAddAll("type2", newList(f2), randomBoolean());
106-
} catch (IllegalArgumentException e) {
107-
assertThat(e.getMessage(), containsString("mapper [foo] has different [index_name]"));
108-
}
109-
}
110-
11186
public void testCheckCompatibilityMismatchedTypes() {
11287
FieldMapper f1 = new MockFieldMapper("foo");
11388
FieldTypeLookup lookup = new FieldTypeLookup();

0 commit comments

Comments
 (0)