[TEST] Only reset test cluster if a test actually failed

Previously we resetted the test cluster for all subsequent tests
even though they didn't fail. This make suites like REST tests faster
and prevents crazy timeouts.

Closes #7775