fix bwc test to be more lenient on error message when _field_names is
not supported
This commit is contained in:
parent
78df69e6a0
commit
cc8f159a3c
|
@ -22,6 +22,7 @@ import com.carrotsearch.randomizedtesting.generators.RandomPicks;
|
||||||
import org.apache.lucene.index.Fields;
|
import org.apache.lucene.index.Fields;
|
||||||
import org.apache.lucene.util.English;
|
import org.apache.lucene.util.English;
|
||||||
import org.elasticsearch.ElasticsearchIllegalArgumentException;
|
import org.elasticsearch.ElasticsearchIllegalArgumentException;
|
||||||
|
import org.elasticsearch.ExceptionsHelper;
|
||||||
import org.elasticsearch.Version;
|
import org.elasticsearch.Version;
|
||||||
import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus;
|
import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus;
|
||||||
import org.elasticsearch.action.admin.indices.alias.Alias;
|
import org.elasticsearch.action.admin.indices.alias.Alias;
|
||||||
|
@ -396,7 +397,7 @@ public class BasicBackwardsCompatibilityTest extends ElasticsearchBackwardsCompa
|
||||||
.addMapping("type", mapping));
|
.addMapping("type", mapping));
|
||||||
} catch (MapperParsingException ex) {
|
} catch (MapperParsingException ex) {
|
||||||
assertThat(ex.getCause(), instanceOf(ElasticsearchIllegalArgumentException.class));
|
assertThat(ex.getCause(), instanceOf(ElasticsearchIllegalArgumentException.class));
|
||||||
assertThat(ex.getCause().getMessage(), equalTo("type=_field_names is not supported on indices created before version 1.3.0 is your cluster running multiple datanode versions?"));
|
assertThat(ExceptionsHelper.detailedMessage(ex).contains("type=_field_names is not supported on indices created before version 1.3.0"), equalTo(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue