Repository navigation
Commit d72a930
committed
[TEST] Let a cancelled request end either of the two ways it can
RepeatedCallerThreadCancelsAreClean summed Cancelled and Response over twenty
attempts against a closed port and asked for at least one each. There is a
third way such an attempt ends: the connection fails before the cancel arrives,
and the cancel is then correctly a no-op. Where the caller and the IO thread
share a core that is the usual outcome, and the case fails.
Measured with the run pinned to one core, fifteen runs each: 15 of 15 fail on
main at 3fb1d31, on open-telemetry#4395 at 66ab56c, and on this branch either side of the
change it carries, all with the same 3 to 7 cancels out of 20. Unpinned all
four pass. The failure the valgrind job hit is that, not anything about the
handle accounting.
The connection failure is counted apart from terminal_count_, which two other
cases pin to an exact value, and it is taken before the existing chain rather
than inside it, because ACancelBeforeTheResponseReportsCancelled cancels from
ConnectFailed and needs that branch to keep firing. The case now asks each
attempt to end somewhere the handler is told about rather than to end the same
way twenty times, which is what it was after. Pinned to one core it goes from
15 of 15 failing to 0 of 15.
Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>1 parent ba35858 commit d72a930
1 file changed
Lines changed: 17 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
146 | 154 | | |
147 | 155 | | |
148 | 156 | | |
| |||
168 | 176 | | |
169 | 177 | | |
170 | 178 | | |
| 179 | + | |
171 | 180 | | |
172 | 181 | | |
173 | 182 | | |
| |||
822 | 831 | | |
823 | 832 | | |
824 | 833 | | |
825 | | - | |
826 | | - | |
827 | 834 | | |
828 | 835 | | |
829 | 836 | | |
| |||
840 | 847 | | |
841 | 848 | | |
842 | 849 | | |
843 | | - | |
844 | | - | |
845 | 850 | | |
846 | | - | |
847 | | - | |
848 | | - | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
849 | 859 | | |
850 | 860 | | |
851 | 861 | | |
| |||
0 commit comments