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.
  • Loading branch information
dadoonet committed Oct 15, 2014
1 parent 9d9c19b commit cb869cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -32,7 +32,7 @@
</parent>

<properties>
<elasticsearch.version>1.4.0.Beta1</elasticsearch.version>
<elasticsearch.version>1.4.0-SNAPSHOT</elasticsearch.version>
<lucene.maven.version>4.10.1</lucene.maven.version>
<lucene.version>4.10.1</lucene.version>
<tests.jvms>1</tests.jvms>
Expand Down
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 cb869cd

Please sign in to comment.