mantidproject / mantidimaging

Graphical toolkit for neutron imaging.
https://mantidproject.github.io/mantidimaging
GNU General Public License v3.0
10 stars 6 forks source link

Catch errors raised by operations in the system tests #2253

Closed samtygier-stfc closed 2 days ago

samtygier-stfc commented 3 days ago

With a filter for messages that are expected

Issue

Can be applied once #2250 is fixed.

Description

Some of the operations raise exception under normal circumstances (e.g. after running a crop, the same parameters are used to redraw the preview, but fail because the input dimensions are different). So the operations window catches and displays the error. Unfortunately this hides actual errors from the system tests.

This change introduces a small allow list of error messages. Any thing else will count as a test failure.

Testing & Acceptance Criteria

Add a raise RuntimeError("hello") into one of the operations and check that the system-test fails

Documentation

Release notes

samtygier-stfc commented 3 days ago

This now catches the error https://github.com/mantidproject/mantidimaging/actions/runs/9790691503/job/27032847828?pr=2253 image

samtygier-stfc commented 3 days ago

Rebased on fix so should pass now.

coveralls commented 3 days ago

Coverage Status

coverage: 73.144%. remained the same when pulling 68cd1a607cad4a4a3581fa6ef5586de294cbecaa on 2250-catch-operation-errors into df9363b8c19a617fdf378f71e23098ac533da395 on main.