Skip to content

Commit

Permalink
Extract number of nodes (#826) (#829)
Browse files Browse the repository at this point in the history
* Extract number of nodes

Extract number of nodes from the input to pass as PnumNodes

Signed-off-by: Monu Singh <[email protected]>

Signed-off-by: Monu Singh <[email protected]>

* Update integtest.sh

Added further logging

Signed-off-by: Monu Singh <[email protected]>

Signed-off-by: Monu Singh <[email protected]>

---------

Signed-off-by: Monu Singh <[email protected]>
(cherry picked from commit 9408b3d)

Co-authored-by: Monu Singh <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and monusingh-1 authored May 17, 2023
1 parent d931daf commit 9f813dc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/integtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,19 @@ then

leader=$(echo $data | cut -d ',' -f1 | cut -d ':' -f1,2 )
follower=$(echo $data | cut -d ',' -f2 | cut -d ':' -f1,2 )
echo "leader: $leader"
echo "follower: $follower"

# Get number of nodes, assuming both leader and follower have same number of nodes
numNodes=$((${follower##*:} - ${leader##*:}))
echo "numNodes: $numNodes"

LTRANSPORT_PORT=$(echo $data | cut -d ',' -f1 | cut -d ':' -f1,3 )
FTRANSPORT_PORT=$(echo $data | cut -d ',' -f2 | cut -d ':' -f1,3 )
eval "./gradlew integTestRemote -Dleader.http_host=\"$leader\" -Dfollower.http_host=\"$follower\" -Dfollower.transport_host=\"$FTRANSPORT_PORT\" -Dleader.transport_host=\"$LTRANSPORT_PORT\" -Dsecurity_enabled=\"$SECURITY_ENABLED\" -Duser=\"$USERNAME\" -Dpassword=\"$PASSWORD\" --console=plain "
echo "LTRANSPORT_PORT: $LTRANSPORT_PORT"
echo "FTRANSPORT_PORT: $FTRANSPORT_PORT"

eval "./gradlew integTestRemote -Dleader.http_host=\"$leader\" -Dfollower.http_host=\"$follower\" -Dfollower.transport_host=\"$FTRANSPORT_PORT\" -Dleader.transport_host=\"$LTRANSPORT_PORT\" -Dsecurity_enabled=\"$SECURITY_ENABLED\" -Duser=\"$USERNAME\" -Dpassword=\"$PASSWORD\" -PnumNodes=$numNodes --console=plain "

else
# Single cluster
Expand Down

0 comments on commit 9f813dc

Please sign in to comment.