Skip to content

Commit

Permalink
LRQA-54230 Add a target to stop follower elasticsearch
Browse files Browse the repository at this point in the history
  • Loading branch information
Linda Sui authored and brianchandotcom committed Feb 26, 2020
1 parent a5ccd34 commit 6ff3279
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions build-test-elasticsearch7.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,44 @@ xpack.monitoring.collection.enabled: true</echo>
</if>
</target>

<target name="stop-follower-elasticsearch">
<configure-elasticsearch7-test-properties />

<if>
<os family="unix" />
<then>
<loadfile
property="pid-elasticsearch"
srcFile="${elasticsearch.dir}-2/pid-elasticsearch"
>
<filterchain>
<linecontainsregexp>
<regexp pattern="[0-9]*" />
</linecontainsregexp>
</filterchain>
</loadfile>

<exec dir="${elasticsearch.dir}-2/bin" executable="/bin/bash">
<arg value="-c" />
<arg value="kill ${pid-elasticsearch}" />
</exec>

<var name="pid-elasticsearch" unset="true" />
</then>
<elseif>
<os family="windows" />
<then>
<exec dir="${elasticsearch.dir}-2/bin" executable="cmd" spawn="true">
<arg value="/c" />
<arg value="for /f %x in (pid-elasticsearch) do taskkill /f /pid %x" />
</exec>
</then>
</elseif>
</if>

<print-file file.name="${elasticsearch.dir}-2/logs/LiferayElasticsearchClusterTwo.log" />
</target>

<target name="stop-kibana">
<configure-elasticsearch7-test-properties />

Expand Down

0 comments on commit 6ff3279

Please sign in to comment.