Commit 4db2304
committed
fix(tests): replace sleep with anyio.Event in test_session
Replace `await anyio.sleep(0.1)` in `run_server` with an `anyio.Event`
that the mock client sets after receiving the error response. The server
now waits on a precise signal instead of guessing how long the client
needs.1 parent 2fe56e5 commit 4db2304
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| 452 | + | |
452 | 453 | | |
453 | 454 | | |
454 | 455 | | |
| |||
460 | 461 | | |
461 | 462 | | |
462 | 463 | | |
463 | | - | |
464 | | - | |
465 | | - | |
| 464 | + | |
| 465 | + | |
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
| 481 | + | |
| 482 | + | |
481 | 483 | | |
482 | 484 | | |
483 | 485 | | |
| |||
0 commit comments