precice / systemtests

Testing preCICE / solver combinations using Docker
GNU General Public License v3.0
3 stars 4 forks source link

Implement a clear return and exception strategy #192

Closed fsimonis closed 4 years ago

fsimonis commented 4 years ago

Currently, it is not clear what the return values of some of the functions are and which exceptions they may throw. As a direct result, the local_tests fail due to exceptions leaking down to the main.

My suggestion is:

Tests run as units that return whether they passed as a bool. They don't throw expected exceptions such as problems during the test itself. Internal errors and failure reasons are logged.

My suggestion for the internal handling 1

Internal exceptions are of type SystemTestException and have one of the following 3 types all inheriting from the aforementioned class:

My suggestion for the internal handling 2

Internal exceptions are treated in place. Every function returns a success state as a bool and logs all reasons for a failure.