Commit 5d421a6
committed
tests: tweak timings so we cancel during HTTP processing
There are 3 possibilities:
* We cancel before the HTTP request (possibly even before the dial has completed)
* We cancel during the delay in our slow server
* We cancel after request processing
Because our intervals were [0, 1s] and [0.5s, 2s] I think we
previously could have hit all three cases.
Likely there is a bug lurking in one of these three cases,
but let's start by making the delays such that we are
always in the second situation (assuming dialing localhost
takes < 1s)
We now delay the HTTP response by 3 seconds, and cancel
after a random value in the interval [1s, 2s)1 parent a515c83 commit 5d421a6
1 file changed
+22
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
109 | 118 | | |
110 | | - | |
111 | | - | |
| 119 | + | |
| 120 | + | |
112 | 121 | | |
113 | 122 | | |
114 | 123 | | |
115 | | - | |
| 124 | + | |
116 | 125 | | |
117 | 126 | | |
118 | | - | |
| 127 | + | |
119 | 128 | | |
120 | 129 | | |
121 | 130 | | |
| |||
360 | 369 | | |
361 | 370 | | |
362 | 371 | | |
363 | | - | |
| 372 | + | |
| 373 | + | |
364 | 374 | | |
365 | 375 | | |
366 | 376 | | |
| |||
420 | 430 | | |
421 | 431 | | |
422 | 432 | | |
423 | | - | |
424 | | - | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
425 | 439 | | |
426 | 440 | | |
427 | 441 | | |
| |||
0 commit comments