Only assert that analyzers are the same if lucene version is the same
This commit is contained in:
parent
f071f327db
commit
a29f734b75
|
@ -63,10 +63,14 @@ public class PreBuiltAnalyzerTests extends ESSingleNodeTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testThatInstancesAreCachedAndReused() {
|
public void testThatInstancesAreCachedAndReused() {
|
||||||
assertThat(PreBuiltAnalyzers.ARABIC.getAnalyzer(Version.CURRENT),
|
assertSame(PreBuiltAnalyzers.ARABIC.getAnalyzer(Version.CURRENT),
|
||||||
is(PreBuiltAnalyzers.ARABIC.getAnalyzer(Version.CURRENT)));
|
PreBuiltAnalyzers.ARABIC.getAnalyzer(Version.CURRENT));
|
||||||
assertThat(PreBuiltAnalyzers.ARABIC.getAnalyzer(Version.V_2_0_0),
|
// same lucene version should be cached
|
||||||
is(PreBuiltAnalyzers.ARABIC.getAnalyzer(Version.V_2_2_0)));
|
assertSame(PreBuiltAnalyzers.ARABIC.getAnalyzer(Version.V_2_0_0),
|
||||||
|
PreBuiltAnalyzers.ARABIC.getAnalyzer(Version.V_2_0_1));
|
||||||
|
|
||||||
|
assertNotSame(PreBuiltAnalyzers.ARABIC.getAnalyzer(Version.V_2_0_0),
|
||||||
|
PreBuiltAnalyzers.ARABIC.getAnalyzer(Version.V_2_2_0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testThatAnalyzersAreUsedInMapping() throws IOException {
|
public void testThatAnalyzersAreUsedInMapping() throws IOException {
|
||||||
|
|
Loading…
Reference in New Issue