Repository navigation
Commit a56336e
committed
test: a cancel racing the exchange's end, a forged body, the watcher kind
Review round 2's R2-1, R2-2 and R2-3.
R2-1: cancellation_test.rb gains the deterministic race -- an ordinary
caller's hook registered before the adapter's parks the canceller
between Source#cancel's flag flip and the adapter's hook, a fake client
answers a 204 once the flag is up, check-after-resume settles the pivot
cancelled and the exchange closes its queue, and only then does the
adapter's hook run. Source#cancel must return true on the canceller's
thread; against the pre-fix push it returned ClosedQueueError, and the
canceller is unparked from an ensure so no assertion path leaves the
thread parked.
R2-2: request_mapper_test.rb's forged request takes method: and body:,
and the body-forbidden clause is asserted over a forged GET and HEAD
carrying a body -- the only shape that reaches the guard, since HTTP-7
makes a built GET's body nil -- with a forged POST as the control that
shows the fixture carries its body through. Removing the guard now
fails by name where it survived every suite.
R2-3: the ASYNC-20 case reads the delivered response's watcher while
the body is open -- one per response, transient -- and asserts it after
the body's release, so a watcher spawned without transient: true fails
in milliseconds by name instead of holding the reactor open until the
run is killed. watcher_tasks joins the reactor helper beside
assert_exchange_released, which now reads through it.1 parent e1f65b0 commit a56336e
3 files changed
Lines changed: 111 additions & 18 deletions
File tree
- gems/dexpace-transport-async_http/test
- dexpace/transport/async_http
- support
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 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 | + | |
115 | 168 | | |
116 | 169 | | |
117 | 170 | | |
| |||
146 | 199 | | |
147 | 200 | | |
148 | 201 | | |
149 | | - | |
150 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
151 | 210 | | |
152 | 211 | | |
153 | 212 | | |
154 | | - | |
| 213 | + | |
155 | 214 | | |
156 | 215 | | |
157 | 216 | | |
| |||
161 | 220 | | |
162 | 221 | | |
163 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
164 | 227 | | |
| 228 | + | |
| 229 | + | |
165 | 230 | | |
166 | 231 | | |
167 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
53 | | - | |
| 53 | + | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | | - | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
172 | | - | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
178 | 197 | | |
179 | 198 | | |
180 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 31 | + | |
| 32 | + | |
37 | 33 | | |
38 | 34 | | |
39 | | - | |
| 35 | + | |
| 36 | + | |
40 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
41 | 51 | | |
42 | 52 | | |
43 | | - | |
44 | | - | |
| 53 | + | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
| |||
0 commit comments