Remove some cases in FieldTypeLookupTests that are no longer relevant. (#31381)

This commit is contained in:
Julie Tibshirani 2018-06-17 21:42:42 -07:00 committed by GitHub
parent 3d5f113ada
commit 16fa6b270f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 25 deletions

View File

@ -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();