print PID when starting ES in integ tests too.
This commit is contained in:
parent
fb62d945aa
commit
7a9f74de80
|
@ -37,8 +37,25 @@
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
|
|
||||||
|
<!-- extracts PID from file -->
|
||||||
|
<macrodef name="extract-pid">
|
||||||
|
<attribute name="property"/>
|
||||||
|
<sequential>
|
||||||
|
<loadfile srcFile="${integ.pidfile}" property="@{property}">
|
||||||
|
<filterchain>
|
||||||
|
<striplinebreaks/>
|
||||||
|
</filterchain>
|
||||||
|
</loadfile>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
<!-- unzip core release artifact and start ES -->
|
<!-- unzip core release artifact and start ES -->
|
||||||
<target name="start-external-cluster" depends="stop-external-cluster" unless="${shouldskip}">
|
<target name="start-external-cluster" depends="stop-external-cluster" unless="${shouldskip}">
|
||||||
|
<local name="integ.finalname"/>
|
||||||
|
<local name="integ.home"/>
|
||||||
|
<local name="integ.repo.home"/>
|
||||||
|
<local name="integ.pid"/>
|
||||||
|
|
||||||
<delete dir="${integ.scratch}"/>
|
<delete dir="${integ.scratch}"/>
|
||||||
<property name="integ.finalname" value="${project.artifactId}-${project.version}"/>
|
<property name="integ.finalname" value="${project.artifactId}-${project.version}"/>
|
||||||
|
|
||||||
|
@ -56,11 +73,17 @@
|
||||||
<http url="http://127.0.0.1:9200"/>
|
<http url="http://127.0.0.1:9200"/>
|
||||||
</waitfor>
|
</waitfor>
|
||||||
|
|
||||||
<echo>External cluster started</echo>
|
<extract-pid property="integ.pid"/>
|
||||||
|
<echo>External cluster started PID ${integ.pid}</echo>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- unzip core release artifact, install plugin, then start ES -->
|
<!-- unzip core release artifact, install plugin, then start ES -->
|
||||||
<target name="start-external-cluster-with-plugin" depends="stop-external-cluster" unless="${shouldskip}">
|
<target name="start-external-cluster-with-plugin" depends="stop-external-cluster" unless="${shouldskip}">
|
||||||
|
<local name="integ.home"/>
|
||||||
|
<local name="integ.repo.home"/>
|
||||||
|
<local name="integ.plugin.url"/>
|
||||||
|
<local name="integ.pid"/>
|
||||||
|
|
||||||
<delete dir="${integ.scratch}"/>
|
<delete dir="${integ.scratch}"/>
|
||||||
<unzip src="${org.elasticsearch:elasticsearch:zip}"
|
<unzip src="${org.elasticsearch:elasticsearch:zip}"
|
||||||
dest="${integ.scratch}"/>
|
dest="${integ.scratch}"/>
|
||||||
|
@ -81,12 +104,15 @@
|
||||||
<http url="http://127.0.0.1:9200"/>
|
<http url="http://127.0.0.1:9200"/>
|
||||||
</waitfor>
|
</waitfor>
|
||||||
|
|
||||||
<echo>External cluster started</echo>
|
<extract-pid property="integ.pid"/>
|
||||||
|
<echo>External cluster started PID ${integ.pid}</echo>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- TODO, for some more safety, add back some of the old jps logic
|
<!-- TODO, for some more safety, add back some of the old jps logic
|
||||||
and verify the pid is really an ES process! (fail otherwise) -->
|
and verify the pid is really an ES process! (fail otherwise) -->
|
||||||
<target name="stop-external-cluster" if="integ.pidfile.exists">
|
<target name="stop-external-cluster" if="integ.pidfile.exists">
|
||||||
|
<local name="integ.pid"/>
|
||||||
|
|
||||||
<!-- read contents of the pid file -->
|
<!-- read contents of the pid file -->
|
||||||
<loadfile srcFile="${integ.pidfile}" property="integ.pid">
|
<loadfile srcFile="${integ.pidfile}" property="integ.pid">
|
||||||
<filterchain>
|
<filterchain>
|
||||||
|
|
Loading…
Reference in New Issue