Tests: index.version.created must be set
Due to this [change](https://github.com/elasticsearch/elasticsearch/pull/8018), we need to fix our tests for elasticsearch 1.4.0 and above. Closes #33. (cherry picked from commit cb869cd)
This commit is contained in:
parent
6a5f662c4d
commit
bcdba5dbf7
|
@ -19,6 +19,8 @@
|
|||
|
||||
package org.elasticsearch.index.analysis;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.cluster.metadata.IndexMetaData;
|
||||
import org.elasticsearch.common.inject.Injector;
|
||||
import org.elasticsearch.common.inject.ModulesBuilder;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
|
@ -43,7 +45,9 @@ public class SimplePhoneticAnalysisTests extends ElasticsearchTestCase {
|
|||
|
||||
@Test
|
||||
public void testPhoneticTokenFilterFactory() {
|
||||
Settings settings = settingsBuilder().loadFromClasspath("org/elasticsearch/index/analysis/phonetic-1.yml").build();
|
||||
Settings settings = settingsBuilder().loadFromClasspath("org/elasticsearch/index/analysis/phonetic-1.yml")
|
||||
.put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT)
|
||||
.build();
|
||||
AnalysisService analysisService = testSimpleConfiguration(settings);
|
||||
TokenFilterFactory filterFactory = analysisService.tokenFilter("phonetic");
|
||||
MatcherAssert.assertThat(filterFactory, instanceOf(PhoneticTokenFilterFactory.class));
|
||||
|
|
Loading…
Reference in New Issue