Commit 181ceed
authored
test(e2e): split node-killing HA test into its own composed suite file (#24503)
Round-2 e2e consolidation, PR 9/9 — owns `composed/**`.
## Clock-skew suite stays on the composed HA Postgres cluster
The four `Clock Skew and Timezone Safety` its in
`composed/ha/e2e_ha_full.parallel.test.ts` exercise
`PostgresSlashingProtectionDatabase` directly against the running 5-node
HA cluster's **real dockerized PostgreSQL** slashing-protection DB:
- TZ-independent duty timestamps (absolute-time storage)
- `cleanupOldDuties` keeps recent duties when the node clock is 2h ahead
- `cleanupOldDuties` deletes old duties by DB time even when the node
clock is 1h behind
- `cleanupOwnStuckDuties` keeps recent stuck duties when the node clock
is 3h ahead
The property under test is that these DB-clock semantics
(`CURRENT_TIMESTAMP`, `timestamptz`) are immune to node clock/timezone
skew — the node and its database must be able to genuinely diverge in
clock and timezone environment for the assertion to mean anything. That
only holds against a real, separate Postgres process. An earlier
revision moved these into an in-process PGlite file; since PGlite runs
inside the Node process, the DB and node can never actually diverge, so
that variant is dropped. The tests keep riding the composed cluster's
docker Postgres via the shared `HaFullTestContext` (`t.mainPool` /
`t.dateProvider`), exactly as before; `dateProvider` simulates the
skewed node clock while the DB uses its own clock. The
`@electric-sql/pglite` dependency added for the PGlite variant is
removed from end-to-end (other workspaces that use pglite for unit tests
are unaffected).
## Order-dependent HA test → own file
The `should distribute work across multiple HA nodes` test was annotated
`must run last` because it permanently kills every node. Extracted
verbatim into `composed/ha/e2e_ha_distribute_work.test.ts`, which shares
the cluster setup with the remaining suite via a new non-test
`ha_full_setup.ts` module (the ~380-line `beforeAll`/`afterAll`/helpers
moved verbatim into an `HaFullTestContext` class). Result:
- The killer test gets its own cluster; the ordering contract is gone
(no hidden reliance on definition order).
- It has a single `it`, so it is a plain `.test.ts` (not `.parallel`)
and runs as one whole-file CI container.
- The remaining `e2e_ha_full.parallel.test.ts` keeps its 3
non-destructive its (block production, governance voting, keystore
reload) plus the clock-skew describe, all order-independent.
- Zero CI runtime change: setup was moved, not rewritten, so behavior is
unchanged. No assertions dropped.
Added a `.test_patterns.yml` flaky entry for the new file mirroring the
existing `e2e_ha_full` one (owner unchanged).
## Stranded composed tests — left in place, still excluded
`composed/e2e_persistence.test.ts` and
`composed/integration_proof_verification.test.ts` are excluded from
every CI list and have run nowhere since April 2025. I moved each into a
category dir, ran it, and reverted the move because both are broken on
the current branch — root causes outside this diff's editable scope:
| File | Disposition | Why |
|---|---|---|
| `integration_proof_verification.test.ts` | left in `composed/`,
excluded, documented | Committed
`fixtures/dumps/epoch_proof_result.json` is stale (last regenerated Feb
2026; circuits/VK changed since). bb and the on-chain HonkVerifier both
reject the proof (`Failed to verify RootRollupArtifact proof!`). Needs
the fixture regenerated; better relocated to the bb-prover circuit
tests. |
| `e2e_persistence.test.ts` | left in `composed/`, excluded, documented
| `beforeAll` no longer completes: the single-node sequencer stalls in
checkpoint proposal (`waitForAttestationsAndEnqueueSubmissionAsync`) and
the 600s hook times out. The root cause is in shared setup/sequencer,
not this file. |
Each file's header comment and the `bootstrap.sh` exclusion now document
the real reason (previously "excluded for unknown reasons"). **Decision
items for follow-up:** regenerate the epoch-proof fixture and relocate
`integration_proof_verification` to bb-prover; fix the single-node
checkpoint stall and refile `e2e_persistence` under `single-node/`.
## Verified locally
- `yarn build` (full), `yarn format end-to-end`, `yarn lint end-to-end`
— all clean.
- Confirmed both stranded tests fail on this branch (evidence above),
which is why they stay excluded.
- The compose/ha suites need docker (Postgres/Web3Signer) and were not
run locally; the `e2e_ha_full` / `e2e_ha_distribute_work` split and the
clock-skew describe rely on CI. Setup is moved verbatim and each
`.parallel` it is already isolated per container, so runtime behavior is
unchanged.1 parent a5b3c78 commit 181ceed
7 files changed
Lines changed: 740 additions & 598 deletions
File tree
- yarn-project/end-to-end
- src/composed
- ha
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
400 | 404 | | |
401 | 405 | | |
402 | 406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| |||
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| |||
Lines changed: 210 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
0 commit comments