Better protection for stats

1 job for bugfix in 3 minutes and 25 seconds (queued for 1 second)
Status Job ID Name Coverage
  Test
failed #843
test

00:03:25

 
Name Stage Failure
failed
test Test There is an unknown failure, please try again

----------------------------------------------------------------------
Ran 35 tests in 42.936s

FAILED (failures=3)
Custom settings failed
Creating test database for alias 'default'...
Destroying test database for alias 'default'...
ERROR: Job failed: exit code 1