Commit 3b8b148
committed
Testing: watch buggify on by default in the repo's own harness backends (BG-2)
The library default stays clean (buggify-off is the emulator's shipped behavior, since it is
public and that decision belongs to each downstream consumer). One level up, where we own the
tests, the harness backends turn on seeded watch chaos by default so every watch-arming suite
exercises the weak watch contract (a watch may fire spuriously, and a net-reverted change may
never fire) instead of the emulator's deterministic-but-unrealistic clean watches. Each store
gets a per-test-name seed, so a run is reproducible and a failure replays.
- FakeDbStore.Buggify.EnableChaos(name, ...): the one-line, per-suite opt-in the design promised
for SDK-level consumers. Derives a process-stable seed from the name (FNV-1a, not the
per-run-randomized string.GetHashCode) and installs a chaos profile.
- Harness backends flipped chaos-on: FakeDbTestBackend (the dual-backend layer-suite backend) and
the Docker-free conformance heads (Transaction, Smoke, RangeQuery, Retryable). Chaos is a no-op
for any suite that arms no watches (nothing to fire, no checks to defer), so this is behaviorally
inert everywhere except the transaction conformance watch facts.
- The scenario family (generator/trace/replay/dual-live/fuzz) is left buggify-OFF: it is a
trace-comparison / exact-semantics engine, and the real-vs-FakeDb dual-live and FdbLite-vs-FakeDb
emulator differentials must stay head-for-head faithful (BG-4). Injected glitches are designed
divergence; a buggify-on differential would only re-prove the injection the injection facts
already prove directly.
- The watch conformance facts that assert exact fire/pending timing opt out with one line -
RequireCleanWatches() - which documents "this test needs clean watches" at the site. Two facts
actually failed under their seed (spurious-fired a should-be-pending watch); the rest assert exact
timing too and are annotated for robustness against a future seed/rate change.
Migration outcome: full FakeDb suite green (0 failed), the scenario dual-live/trace heads green with
buggify off.1 parent 6d94d14 commit 3b8b148
8 files changed
Lines changed: 120 additions & 11 deletions
File tree
- FoundationDB.FakeDb.Tests
- Conformance
- FoundationDB.FakeDb
- FoundationDB.Layers.Tests
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1668 | 1668 | | |
1669 | 1669 | | |
1670 | 1670 | | |
1671 | | - | |
| 1671 | + | |
1672 | 1672 | | |
1673 | 1673 | | |
1674 | 1674 | | |
1675 | 1675 | | |
1676 | 1676 | | |
1677 | 1677 | | |
1678 | | - | |
| 1678 | + | |
1679 | 1679 | | |
1680 | 1680 | | |
1681 | 1681 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
| 461 | + | |
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
468 | | - | |
| 468 | + | |
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
3447 | 3451 | | |
3448 | 3452 | | |
3449 | 3453 | | |
| 3454 | + | |
| 3455 | + | |
3450 | 3456 | | |
3451 | 3457 | | |
3452 | 3458 | | |
| |||
3507 | 3513 | | |
3508 | 3514 | | |
3509 | 3515 | | |
| 3516 | + | |
3510 | 3517 | | |
3511 | 3518 | | |
3512 | 3519 | | |
| |||
3597 | 3604 | | |
3598 | 3605 | | |
3599 | 3606 | | |
| 3607 | + | |
3600 | 3608 | | |
3601 | 3609 | | |
3602 | 3610 | | |
| |||
3658 | 3666 | | |
3659 | 3667 | | |
3660 | 3668 | | |
| 3669 | + | |
| 3670 | + | |
3661 | 3671 | | |
3662 | 3672 | | |
3663 | 3673 | | |
| |||
3707 | 3717 | | |
3708 | 3718 | | |
3709 | 3719 | | |
| 3720 | + | |
| 3721 | + | |
3710 | 3722 | | |
3711 | 3723 | | |
3712 | 3724 | | |
| |||
3765 | 3777 | | |
3766 | 3778 | | |
3767 | 3779 | | |
| 3780 | + | |
3768 | 3781 | | |
3769 | 3782 | | |
3770 | 3783 | | |
| |||
3816 | 3829 | | |
3817 | 3830 | | |
3818 | 3831 | | |
| 3832 | + | |
3819 | 3833 | | |
3820 | 3834 | | |
3821 | 3835 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
54 | | - | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4272 | 4272 | | |
4273 | 4273 | | |
4274 | 4274 | | |
| 4275 | + | |
| 4276 | + | |
| 4277 | + | |
| 4278 | + | |
| 4279 | + | |
| 4280 | + | |
| 4281 | + | |
| 4282 | + | |
| 4283 | + | |
| 4284 | + | |
| 4285 | + | |
| 4286 | + | |
| 4287 | + | |
| 4288 | + | |
| 4289 | + | |
| 4290 | + | |
| 4291 | + | |
| 4292 | + | |
| 4293 | + | |
| 4294 | + | |
| 4295 | + | |
| 4296 | + | |
| 4297 | + | |
| 4298 | + | |
| 4299 | + | |
| 4300 | + | |
| 4301 | + | |
| 4302 | + | |
4275 | 4303 | | |
4276 | 4304 | | |
4277 | 4305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
65 | 75 | | |
66 | 76 | | |
67 | 77 | | |
0 commit comments