Commit 7d61a0c
committed
fix: test_failing_filter intermittent issue
We intermittently get failures in this test while destroying the microVM
object given to us by the fixture. That code checks that the microVM was
not killed due to a signal and in this case, it clearly has (that's the
intention of the test). The test itself is marking the microVM as killed
so the cleanup logic should never reach that check.
The only way that kill() fails in this case is when
test_microvm.mark_killed() (the last command in this test) is never
called, meaning that the test errors out before that. I believe that the
only point in the code that can cause the test to exit earlier is this:
```
try:
test_microvm.start()
except requests.exceptions.ConnectionError:
pass
```
We are expecting test_microvm.start() to fail due to seccomp violations,
however we are only catching the ConnectionError exception. If any other
exception is raised the test will fail pre-maturely without setting
test_microvm.mark_killed(). In fact, looking at the backtrace from
intermittent failures it looks like the code is actually raising a
ConnectionResetError.
Change the test to catch any error, rather than just ConnectionError.
Signed-off-by: Babis Chalios <[email protected]>1 parent dcfc4c1 commit 7d61a0c
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
| 77 | + | |
79 | 78 | | |
80 | 79 | | |
81 | | - | |
| 80 | + | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
0 commit comments