From 5505bbeb17f2a691cf1378b70e7cbdda305ea417 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Tue, 28 May 2024 22:15:45 +0200 Subject: [PATCH] remove livness test --- .github/workflows/test.yml | 31 -------------------- contrib/localnet_liveness.sh | 55 ------------------------------------ 2 files changed, 86 deletions(-) delete mode 100755 contrib/localnet_liveness.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8c9862578ba..18dc0faee101 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -241,37 +241,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - liveness-test: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: "1.22" - check-latest: true - cache: true - cache-dependency-path: go.sum - - uses: technote-space/get-diff-action@v6.1.2 - id: git_diff - with: - PATTERNS: | - **/*.go - go.mod - go.sum - **/go.mod - **/go.sum - **/Makefile - Makefile - - name: start localnet - if: env.GIT_DIFF - run: | - make clean localnet-start - - name: test liveness - if: env.GIT_DIFF - run: | - ./contrib/localnet_liveness.sh 100 5 50 localhost - test-sim-nondeterminism: runs-on: ubuntu-latest steps: diff --git a/contrib/localnet_liveness.sh b/contrib/localnet_liveness.sh deleted file mode 100755 index 00c360b98dc7..000000000000 --- a/contrib/localnet_liveness.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -CNT=0 -ITER=$1 -SLEEP=$2 -NUMBLOCKS=$3 -NODEADDR=$4 - -if [ -z "$1" ]; then - echo "Need to input number of iterations to run..." - exit 1 -fi - -if [ -z "$2" ]; then - echo "Need to input number of seconds to sleep between iterations" - exit 1 -fi - -if [ -z "$3" ]; then - echo "Need to input block height to declare completion..." - exit 1 -fi - -if [ -z "$4" ]; then - echo "Need to input node address to poll..." - exit 1 -fi - -docker_containers=( $(docker ps -q -f name=simd --format='{{.Names}}') ) - -while [ ${CNT} -lt $ITER ]; do - curr_block=$(curl -s $NODEADDR:26657/status | jq -r '.result.sync_info.latest_block_height') - - if [ ! -z ${curr_block} ] ; then - echo "Number of Blocks: ${curr_block}" - fi - - if [ ! -z ${curr_block} ] && [ ${curr_block} -gt ${NUMBLOCKS} ]; then - echo "Number of blocks reached. Success!" - exit 0 - fi - - # Emulate network chaos: - # - # Every 10 blocks, pick a random container and restart it. - if ! ((${CNT} % 10)); then - rand_container=${docker_containers["$[RANDOM % ${#docker_containers[@]}]"]}; - echo "Restarting random docker container ${rand_container}" - docker restart ${rand_container} &>/dev/null & - fi - let CNT=CNT+1 - sleep $SLEEP -done -echo "Timeout reached. Failure!" -exit 1