Commit 66f1983
committed
Fix race in test_process_delayed_stdio__not_paused__no_stdin
transport._wait() only waits for the child to be reaped (SIGCHLD), not
for its stdout pipe to be drained and closed. Process exit and pipe EOF
reach libuv through independent kernel mechanisms and can be observed
in different event loop iterations, so the test could assert on
proto.stages before connection_lost had actually fired, sometimes
leaving the pipe/process transports alive past the end of the test.
Wait on the protocol's own connection_lost instead, which uvloop only
fires once the process has exited and all pipes have disconnected.1 parent e271aab commit 66f1983
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
| 890 | + | |
890 | 891 | | |
891 | 892 | | |
892 | 893 | | |
| |||
905 | 906 | | |
906 | 907 | | |
907 | 908 | | |
| 909 | + | |
| 910 | + | |
908 | 911 | | |
909 | 912 | | |
910 | 913 | | |
| |||
962 | 965 | | |
963 | 966 | | |
964 | 967 | | |
965 | | - | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
966 | 978 | | |
967 | 979 | | |
968 | 980 | | |
| |||
0 commit comments