Some tests may generate some side-effects that are not strictly part
of the test, but do trigger the unexpected error checks in the test
harness.
If these side-effects are permanent, one can add the matching predicate
to the expectations. However, it may also be the byproduct of a race,
in which case it may or may not happen.
The ignore_errors_from predicate makes sure that the expectations
do not generate these unexpected errors, while still not demanding
that the predicate matches.
For instance, some Syskit tests check the runtime behavior of killing
the deployment while a long remote call is in progress. This must always
produce the aborted_event emission (which we test for), but also -
depending on timing - may raise ComError at the point of call before
aborted is emitted, which leads to the task being put in quarantine.
The side effect (quarantine) creates an unexpected error
(QuarantinedTaskError). This can be ignored with
Some tests may generate some side-effects that are not strictly part of the test, but do trigger the unexpected error checks in the test harness.
If these side-effects are permanent, one can add the matching predicate to the expectations. However, it may also be the byproduct of a race, in which case it may or may not happen.
The
ignore_errors_from
predicate makes sure that the expectations do not generate these unexpected errors, while still not demanding that the predicate matches.For instance, some Syskit tests check the runtime behavior of killing the deployment while a long remote call is in progress. This must always produce the aborted_event emission (which we test for), but also - depending on timing - may raise ComError at the point of call before aborted is emitted, which leads to the task being put in quarantine.
The side effect (quarantine) creates an unexpected error (QuarantinedTaskError). This can be ignored with