test: Fix tests failing with the default fatal error handler