From cc09c54fb70d32e47f7d45b2fc56d92fdc478046 Mon Sep 17 00:00:00 2001 From: zeagord Date: Sun, 16 Dec 2018 12:30:20 +0700 Subject: [PATCH] Fixes ES integration tests --- .../java/zipkin2/elasticsearch/VersionSpecificTemplates.java | 2 +- .../elasticsearch/integration/ITElasticsearchStorageV2.java | 2 +- .../elasticsearch/integration/ITElasticsearchStorageV5.java | 2 +- .../elasticsearch/integration/ITElasticsearchStorageV6.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/VersionSpecificTemplates.java b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/VersionSpecificTemplates.java index e95ca45e8ab..9479f377d52 100644 --- a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/VersionSpecificTemplates.java +++ b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/VersionSpecificTemplates.java @@ -260,7 +260,7 @@ private String versionSpecificTagIndexTemplate(float version) { + "\"not_analyzed\""); } else if (version >= 5) { return tagIndexTemplate - .replace("TEMPLATE","index_patterns") + .replace("TEMPLATE", version >= 6 ? "index_patterns" : "template") .replace("KEYWORD", "\"type\": \"text\",\"fielddata\": true\n"); }else { throw new IllegalStateException( diff --git a/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ITElasticsearchStorageV2.java b/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ITElasticsearchStorageV2.java index 311d4310be4..c65dfcbbea8 100644 --- a/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ITElasticsearchStorageV2.java +++ b/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ITElasticsearchStorageV2.java @@ -34,7 +34,7 @@ public class ITElasticsearchStorageV2 { static ElasticsearchStorageRule classRule() { - return new ElasticsearchStorageRule("openzipkin/zipkin-elasticsearch:2.11.6", + return new ElasticsearchStorageRule("openzipkin/zipkin-elasticsearch:2.11.12", "test_elasticsearch3"); } diff --git a/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ITElasticsearchStorageV5.java b/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ITElasticsearchStorageV5.java index f6398865047..1cb04598c3d 100644 --- a/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ITElasticsearchStorageV5.java +++ b/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ITElasticsearchStorageV5.java @@ -34,7 +34,7 @@ public class ITElasticsearchStorageV5 { static ElasticsearchStorageRule classRule() { - return new ElasticsearchStorageRule("openzipkin/zipkin-elasticsearch5:2.11.6", + return new ElasticsearchStorageRule("openzipkin/zipkin-elasticsearch5:2.11.12", "test_elasticsearch3"); } diff --git a/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ITElasticsearchStorageV6.java b/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ITElasticsearchStorageV6.java index 08915461822..9aee6e73ceb 100644 --- a/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ITElasticsearchStorageV6.java +++ b/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/integration/ITElasticsearchStorageV6.java @@ -34,7 +34,7 @@ public class ITElasticsearchStorageV6 { static ElasticsearchStorageRule classRule() { - return new ElasticsearchStorageRule("openzipkin/zipkin-elasticsearch6:2.11.6", + return new ElasticsearchStorageRule("openzipkin/zipkin-elasticsearch6:2.11.12", "test_elasticsearch3"); }