I'm not sure what you mean with the exception happens after the test?
Test should be usually atomic and independent, so all resources you create should be removed immediately after your test finished.Also tests are running in random order, so tests which rely on each other will fail sometimes - and sometimes not, depending on the run order.
Can you share the output or tests which fail?