diff --git a/pom.xml b/pom.xml index f1f56123e17..b7d6dd1043e 100644 --- a/pom.xml +++ b/pom.xml @@ -515,6 +515,7 @@ ${tests.cluster} ${tests.heap.size} ${tests.filter} + ${project.version} ${env.ES_TEST_LOCAL} ${es.node.mode} ${es.logger.level} diff --git a/src/test/java/org/elasticsearch/VersionTests.java b/src/test/java/org/elasticsearch/VersionTests.java index b43ac8a6ee9..1c81bce9e73 100644 --- a/src/test/java/org/elasticsearch/VersionTests.java +++ b/src/test/java/org/elasticsearch/VersionTests.java @@ -36,6 +36,16 @@ import static org.hamcrest.Matchers.sameInstance; public class VersionTests extends ElasticsearchTestCase { + @Test + public void testMavenVersion() { + // maven sets this property to ensure that the latest version + // we use here is the version that is actually set to the project.version + // in maven + String property = System.getProperty("tests.version", null); + assumeNotNull(property); + assertEquals(property, Version.CURRENT.toString()); + } + @Test public void testVersions() throws Exception { assertThat(V_0_20_0.before(V_0_90_0), is(true));