Repository navigation
Commit 2941c0b
test(zero-swift): count the busy main actor's time in slices when sending (#131)
URLSessionTransportTests.sendsWhileTheMainActorIsBusy failed on main's iOS
Simulator job at a6e11db with 2 of 200 frames. The whole test process
stalled for about 20 s then: consecutive Network.framework steps of one
connection logged 8 s and 10 s apart, and virtual list tests that don't
touch the network took 14 to 26 s. The main actor's usleep(1 s) ran out
during the stall, and the check ran before the frames' writer, stalled with
it, could catch up.
The main actor now stays busy for 100 slices of 10 ms, the same second,
or until the frames are out, so a stall stretches one slice. Stopping the
test process for 3 s during the wait failed the test 3 of 3 times before
(85, 114 and 110 frames) and passes it 3 of 3 times now. With the writer
back on the main actor, as before #107, it still fails with no frames.
Amp-Thread-ID: https://ampcode.com/threads/T-0d2ed206-a5dd-4f42-9b68-c56e6b23e8f6
Co-authored-by: Amp <amp@ampcode.com>1 parent a99cd95 commit 2941c0b
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
220 | | - | |
| 219 | + | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
0 commit comments