Commit bfa34ce
committed
chore(spec): clean up fellowship sediment + isolate races per run
Two-pronged fix for the shared-app data leak that pollutes client_spec
queries:
1. Active cleanup in before(:all): query_users by the four well-known
fellowship names (Frodo / Sam / Gandalf / Legolas) and hard-delete
any leftovers from prior runs whose after(:all) didn't fire.
delete_users is idempotent, so this is safe to re-run.
2. Per-run unique race tag (e.g. 'Hobbit-aBcD1234') so the queries-users
test stays isolated from concurrent runs and from the sliver between
the cleanup above and the new upserts.
The active-cleanup half stops the sediment from growing forever — the
random-tag-only patch (prior attempt) inserts new users with new tags
every run, so the shared app keeps accumulating users indefinitely.
Per-PR scratch app via create_app is still the right long-term fix and
is tracked separately.1 parent 0d2214b commit bfa34ce
1 file changed
Lines changed: 33 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 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 | + | |
28 | 56 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
33 | 61 | | |
34 | 62 | | |
35 | 63 | | |
| |||
588 | 616 | | |
589 | 617 | | |
590 | 618 | | |
591 | | - | |
| 619 | + | |
592 | 620 | | |
593 | 621 | | |
594 | 622 | | |
| |||
0 commit comments