From 9f813dc7df528c5b2c2d57acb3abd1e7110a2d30 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 17 May 2023 16:44:09 +0530 Subject: [PATCH] Extract number of nodes (#826) (#829) * Extract number of nodes Extract number of nodes from the input to pass as PnumNodes Signed-off-by: Monu Singh Signed-off-by: Monu Singh * Update integtest.sh Added further logging Signed-off-by: Monu Singh Signed-off-by: Monu Singh --------- Signed-off-by: Monu Singh (cherry picked from commit 9408b3d2b21dc786af593e7e93ca43181ed5bba9) Co-authored-by: Monu Singh --- scripts/integtest.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/integtest.sh b/scripts/integtest.sh index ece01bc0..1a0498ae 100755 --- a/scripts/integtest.sh +++ b/scripts/integtest.sh @@ -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