Skip to content

Commit

Permalink
LRQA-54780 Add condition for elastic ccr enabled
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 0d5a293 commit 981b583
Showing 1 changed file with 39 additions and 3 deletions.
42 changes: 39 additions & 3 deletions build-test-elasticsearch7.xml
Original file line number Diff line number Diff line change
Expand Up @@ -969,11 +969,33 @@ xpack.monitoring.collection.enabled: true</echo>
</then>
</if>

<antcall target="configure-elasticsearch-cluster-properties" />
<get-testcase-property property.name="elasticsearch.ccr.enabled" />

<antcall target="prepare-additional-elasticsearch-dirs" />
<if>
<equals arg1="${elastic.ccr.enabled}" arg2="true" />
<then>
<antcall target="configure-elasticsearch-cluster-properties">
<param name="remote.elasticsearch.cluster.size" value="2" />
</antcall>

<antcall target="prepare-additional-elasticsearch-dirs">
<param name="remote.elasticsearch.cluster.size" value="2" />
</antcall>

<antcall target="start-elasticsearch-node" />
<configure-follower-elasticsearch-properties />

<antcall target="start-elasticsearch-node">
<param name="remote.elasticsearch.cluster.size" value="2" />
</antcall>
</then>
<else>
<antcall target="configure-elasticsearch-cluster-properties" />

<antcall target="prepare-additional-elasticsearch-dirs" />

<antcall target="start-elasticsearch-node" />
</else>
</if>

<if>
<equals arg1="${elastic.xpack.enabled}" arg2="true" />
Expand Down Expand Up @@ -1009,11 +1031,25 @@ xpack.monitoring.collection.enabled: true</echo>
/>

<print-file file.name="${elasticsearch.dir}-${elasticsearch.node.number}/logs/LiferayElasticsearchCluster.log" />

<if>
<equals arg1="${remote.elasticsearch.ccr.enabled}" arg2="true" />
<then>
<print-file file.name="${elasticsearch.dir}-2/logs/LiferayElasticsearchClusterTwo.log" />
</then>
</if>
</antelope:repeat>

<fail if="elasticsearch.server.not.started" message="Elasticsearch server failed to initialize." />
</else>
</if>

<if>
<equals arg1="${remote.elasticsearch.ccr.enabled}" arg2="true" />
<then>
<start-ccr-trial />
</then>
</if>
</target>

<target name="start-elasticsearch-node">
Expand Down

0 comments on commit 981b583

Please sign in to comment.