Skip to content

Commit

Permalink
test: Improve revert integration test (#2822)
Browse files Browse the repository at this point in the history
## What ❔

- Removes a data race from the revert integration test (a single node
one); a batch gets executed after it is verified that not all batches
are executed.
- Removes copy-paste between single-node and EN tests.
- Structures revert tests into smaller steps.

## Why ❔

Makes the test less flaky and easier to maintain.

## Checklist

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [x] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.
- [x] Code has been formatted via `zk fmt` and `zk lint`.
  • Loading branch information
slowli authored Sep 10, 2024
1 parent 92dde03 commit 4cff529
Show file tree
Hide file tree
Showing 6 changed files with 663 additions and 744 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ jobs:

- name: Show revert.log logs
if: always()
run: ci_run cat core/tests/revert-test/revert.log || true
run: ci_run cat logs/revert/default/server.log || true

- name: Show upgrade.log logs
if: always()
Expand Down Expand Up @@ -382,7 +382,11 @@ jobs:

- name: Run revert test
run: |
ENABLE_CONSENSUS=${{ matrix.consensus }} DEPLOYMENT_MODE=${{ matrix.deployment_mode }} PASSED_ENV_VARS="ENABLE_CONSENSUS,DEPLOYMENT_MODE" ci_run zk test i revert-en
ENABLE_CONSENSUS=${{ matrix.consensus }} \
DEPLOYMENT_MODE=${{ matrix.deployment_mode }} \
PASSED_ENV_VARS="ENABLE_CONSENSUS,DEPLOYMENT_MODE" \
ci_run zk test i revert-en
# test terminates the nodes, so we restart them.
if [[ "${{ matrix.deployment_mode }}" == "Rollup" ]]; then
ZKSYNC_ENV=docker ci_run zk server --components=$SERVER_COMPONENTS &>>server.log &
Expand Down Expand Up @@ -414,13 +418,13 @@ jobs:
if: always()
run: ci_run cat ext-node.log || true

- name: Show revert_main.log logs
- name: Show revert logs (main node)
if: always()
run: ci_run cat core/tests/revert-test/revert_main.log || true
run: ci_run cat logs/revert/en/default/server.log || true

- name: Show revert_ext.log logs
- name: Show revert logs (EN)
if: always()
run: ci_run cat core/tests/revert-test/revert_ext.log || true
run: ci_run cat logs/revert/en/default/external_node.log || true

- name: Show upgrade.log logs
if: always()
Expand Down
Loading

0 comments on commit 4cff529

Please sign in to comment.