Commit d7c0b96
committed
Avocado instrumented timeout handling in thread
This commit changes the way how avocado instrumented runner handles test
timeouts. For timeout handling, we used to use signals and raising
TestInterrupt error. Such solution has an issue that we can't control
where in the code the Error will be raised, and it can be handled before
it reaches the runner layer. More info about this issue in #6046.
This change removes the signal handling and uses threading instead. Now
each test method will be run in a separated thread and this thread will
be terminated if timeout is reached. This solution selves the raising
error issue and keeps the current test lifecycle untouched.
Reference: #6046
Signed-off-by: Jan Richter <jarichte@redhat.com>1 parent 6fe4b72 commit d7c0b96
File tree
4 files changed
+80
-29
lines changed- avocado
- core
- plugins/runners
- selftests
- functional/plugin/runners
4 files changed
+80
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
654 | 656 | | |
655 | 657 | | |
656 | 658 | | |
657 | | - | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
658 | 662 | | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
665 | 679 | | |
666 | 680 | | |
667 | 681 | | |
| |||
686 | 700 | | |
687 | 701 | | |
688 | 702 | | |
| 703 | + | |
| 704 | + | |
689 | 705 | | |
690 | 706 | | |
691 | 707 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 11 | + | |
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
| |||
138 | 134 | | |
139 | 135 | | |
140 | 136 | | |
141 | | - | |
142 | | - | |
143 | | - | |
| 137 | + | |
144 | 138 | | |
145 | 139 | | |
146 | | - | |
147 | 140 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 141 | + | |
153 | 142 | | |
154 | 143 | | |
155 | | - | |
156 | | - | |
157 | | - | |
| 144 | + | |
158 | 145 | | |
159 | 146 | | |
160 | 147 | | |
| |||
172 | 159 | | |
173 | 160 | | |
174 | 161 | | |
175 | | - | |
176 | | - | |
| 162 | + | |
177 | 163 | | |
178 | 164 | | |
179 | 165 | | |
180 | 166 | | |
181 | | - | |
| 167 | + | |
182 | 168 | | |
183 | 169 | | |
184 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
Lines changed: 50 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | | - | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
6 | 28 | | |
7 | 29 | | |
8 | 30 | | |
| |||
16 | 38 | | |
17 | 39 | | |
18 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
0 commit comments