Skip to content

Commit ea90e1f

Browse files
authored
qa-tests: keep pre-built db synced in RPC Integration Test Latest (#19308)
Currently, when the test runner has to execute a large number of tests, the pre-built database remains well below the tip of the chain, resulting in failed tests. This PR adds a step to delay test execution if the Erigon instance dedicated to the db maintenance is not on the chain tip.
1 parent bd44729 commit ea90e1f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/qa-rpc-integration-tests-latest.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ jobs:
5555
make erigon integration
5656
working-directory: ${{ github.workspace }}
5757

58+
- name: Wait for current Erigon instance to reach the tip
59+
run: |
60+
ERIGON_PID=$(pgrep -x erigon | head -1)
61+
if [ -z "$ERIGON_PID" ]; then
62+
echo "Could not find running Erigon process dedicated to db maintenance"
63+
else
64+
echo "Found Erigon process dedicated to db maintenance, PID: $ERIGON_PID"
65+
python3 $ERIGON_QA_PATH/test_system/qa-tests/tip-sync/run_and_chase_tip.py \
66+
--total-time=$TOTAL_TIME_SECONDS \
67+
--stop-erigon=False \
68+
--erigon-pid=$ERIGON_PID
69+
fi
5870
- name: Pause the Erigon instance dedicated to db maintenance
5971
run: |
6072
python3 $ERIGON_QA_PATH/test_system/db-producer/pause_production.py || true
@@ -78,7 +90,7 @@ jobs:
7890
echo "Running migrations on datadir..."
7991
./integration run_migrations --datadir $ERIGON_TESTBED_DATA_DIR --chain $CHAIN
8092
81-
- name: Run Erigon version and wait for sync
93+
- name: Run Erigon and wait for sync
8294
id: pre_test_step
8395
run: |
8496
set +e # Disable exit on error

0 commit comments

Comments
 (0)