Commit 87edfa9
Make SizeLimit tests deterministic by deduplicating generator output (reactivemarbles#1098)
RandomPersonGenerator emits Person rows drawn from a finite name pool
(~21 girls + ~30 boys cross-joined with 24 lastnames squared). Person.Key
is Person.Name, so two independent .Take(10) calls can produce overlapping
keys with non-trivial probability. When they collide, the second batch's
AddOrUpdate produces 9 Adds + 1 Update instead of 10 Adds, breaking the
per-message assertions in:
- InvokeLimitSizeToWhenOverLimit
- AddMoreThanLimitInBatched
Both tests now draw 60 candidates up front, dedupe by Key, take the first
20, and split into two non-overlapping batches of 10.
Verified: 50/50 consecutive runs of SizeLimitFixture pass with no failures.
Co-authored-by: Darrin Cullop <dacullop@microsoft.com>1 parent 8033135 commit 87edfa9
1 file changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
| |||
96 | 101 | | |
97 | 102 | | |
98 | 103 | | |
99 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
100 | 110 | | |
101 | 111 | | |
102 | 112 | | |
103 | 113 | | |
104 | | - | |
| 114 | + | |
105 | 115 | | |
106 | 116 | | |
107 | 117 | | |
| |||
0 commit comments