diff --git a/x-pack/plugin/vector-tile/src/javaRestTest/java/org/elasticsearch/xpack/vectortile/VectorTileRestIT.java b/x-pack/plugin/vector-tile/src/javaRestTest/java/org/elasticsearch/xpack/vectortile/VectorTileRestIT.java index a77178745d6be..a1db2bbdd7da2 100644 --- a/x-pack/plugin/vector-tile/src/javaRestTest/java/org/elasticsearch/xpack/vectortile/VectorTileRestIT.java +++ b/x-pack/plugin/vector-tile/src/javaRestTest/java/org/elasticsearch/xpack/vectortile/VectorTileRestIT.java @@ -50,11 +50,11 @@ public class VectorTileRestIT extends ESRestTestCase { @ClassRule - public static ElasticsearchCluster cluster = ElasticsearchCluster.local() - .module("vector-tile") - .module("test-error-query") - .setting("xpack.license.self_generated.type", "trial") - .build(); + public static ElasticsearchCluster cluster = ElasticsearchCluster.local().module("vector-tile").apply(c -> { + if (Build.current().isSnapshot()) { + c.module("test-error-query"); + } + }).setting("xpack.license.self_generated.type", "trial").build(); private static final String INDEX_POINTS = "index-points"; private static final String INDEX_POLYGON = "index-polygon";