Commit 4a45645
committed
proto: un-flake TestHasExtensionNoAlloc
Before this change, this test had a flakiness rate of 3 out of 1000 runs
(on Google’s internal testing infrastructure).
After this change, the test is not flaky, even when running with 50_000 runs.
testing.AllocsPerRun is meant to be robust against individual allocations
from background goroutines, but not in the way we called the function.
Change-Id: If99573734fb2de5d7128b5e61c2019867ccbb9b2
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/716520
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Christian Höppner <hoeppi@google.com>1 parent d65e1d4 commit 4a45645
1 file changed
+35
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
120 | 121 | | |
121 | 122 | | |
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 | + | |
123 | 147 | | |
124 | 148 | | |
125 | 149 | | |
126 | 150 | | |
127 | | - | |
128 | | - | |
129 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
130 | 157 | | |
131 | | - | |
132 | 158 | | |
133 | 159 | | |
134 | | - | |
| 160 | + | |
135 | 161 | | |
136 | | - | |
137 | | - | |
138 | 162 | | |
139 | 163 | | |
140 | 164 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
155 | 169 | | |
156 | 170 | | |
157 | 171 | | |
| |||
0 commit comments