Skip to content

Commit

Permalink
Tests: index.version.created must be set
Browse files Browse the repository at this point in the history
Due to this [change](elastic/elasticsearch#8018), we need to fix our tests for elasticsearch 1.4.0 and above.

Closes #33.

(cherry picked from commit cb869cd)
  • Loading branch information
dadoonet committed Oct 15, 2014
1 parent 7b80777 commit 7c22788
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -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;
Expand All @@ -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));
Expand Down

0 comments on commit 7c22788

Please sign in to comment.