Skip to content

Commit

Permalink
Use zos.system.version instaed of rmb.version to test live nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
sameh-farouk committed Dec 12, 2024
1 parent 158443e commit 2780f54
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/rmb_tester/test_live_nodes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fi
RMB_LOG_FILE="./rmb-peer.log"
TIMEOUT="${TIMEOUT:-60}"
RMB_BIN="${RMB_BIN:-../../target/x86_64-unknown-linux-musl/release/rmb-peer}"

VERBOSE="${VERBOSE:-false}"
cleanup() {
echo "stop all bash managed jobs"
jlist=$(jobs -p)
Expand All @@ -36,7 +36,7 @@ trap cleanup SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM
set +e
echo "redis-server starting .."

redis-server --port 6379 2>&1 > /dev/null&
redis-server --port 6379 > /dev/null 2>&1 &
sleep 3
set -e

Expand All @@ -45,12 +45,12 @@ echo "rmb-peer starting .."
$RMB_BIN -m "$MNEMONIC" --substrate "$SUBSTRATE_URL" --relay "$RELAY_URL" --redis "redis://localhost:6379" --debug &> $RMB_LOG_FILE &

# wait till peer establish connection to a relay
timeout --preserve-status 10 tail -f -n0 $RMB_LOG_FILE | grep -qe 'now connected' || (echo "rmb-peer taking too much time to start! check the log at $RMB_LOG_FILE for more info." && cleanup)
timeout --preserve-status 20 tail -f -n0 $RMB_LOG_FILE | grep -qe 'now connected' || (echo "rmb-peer taking too much time to start! check the log at $RMB_LOG_FILE for more info." && cleanup)

# start rmb_tester
source venv/bin/activate
echo "rmb_tester starting .."
python3 ./rmb_tester.py -d $(./scripts/twins.sh --likely-up $1) -c "rmb.version" -t $TIMEOUT -e $TIMEOUT --short
python3 ./rmb_tester.py -d $(./scripts/twins.sh --likely-up $1) -c "zos.system.version" -t "$TIMEOUT" -e "$TIMEOUT" "$(if [[ "$VERBOSE" == "false" ]]; then echo "--short"; fi)"
deactivate

cleanup

0 comments on commit 2780f54

Please sign in to comment.