allegro / allegro/bigflow

`SpawnIsolateMixin` makes underlying errors not visible in traceback

Offen
#379 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
120
Forks
23
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Using `bigflow.testing.SpawnIsolateMixin` mixin in the test case (like [shown in the docs](https://github.com/allegro/bigflow/blob/5381b7e2d92a1e8ee8279f3062e0dee86228c627/docs/e2e_testing.md?plain=1#L211)) makes underlying, actual errors not visible in the traceback. Regardless of the underlying exception (which can be discovered after removing `SpawnIsolateMixin` from the test case), `RuntimeError: Isotalted process was unexpectedly terminated` is always being printed in the traceback.

Here is an example:
```
2023-11-08T11:51:18.8312970Z =================================== FAILURES ===================================
2023-11-08T11:51:18.8314516Z ________ DatasetWorkflowTestCase.test_load_something _________
2023-11-08T11:51:18.8425321Z [gw19] linux -- Python 3.9.18 /opt/hostedtoolcache/Python/3.9.18/x64/bin/python
2023-11-08T11:51:18.8426349Z
2023-11-08T11:51:18.8427441Z self =
2023-11-08T11:51:18.8429540Z result =
2023-11-08T11:51:18.8430959Z msg = 'Isotalted process was unexpectedly terminated'
2023-11-08T11:51:18.8431725Z
2023-11-08T11:51:18.8432233Z def _fail_into_result(self, result: unittest.TestResult, msg):
2023-11-08T11:51:18.8433594Z """Include error with the traceback into `TestResult`"""
2023-11-08T11:51:18.8434627Z try:
2023-11-08T11:51:18.8435779Z > raise RuntimeError(msg)
2023-11-08T11:51:18.8436880Z E RuntimeError: Isotalted process was unexpectedly terminated
2023-11-08T11:51:18.8437714Z
2023-11-08T11:51:18.8438930Z /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/bigflow/testing/isolate.py:102: RuntimeError
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.