We have discovered that there is some test not cleaning up after itself on the engine test suite.
We had an expectation of 0 records in the registration recently and we had to take it out because it was randomly failing for a dirty record not cleaned up in the table in certain occasions.
I suggest we find the offending test adding an around hook to the test suite and checking after the run of every test that the database is clean, and fixing the test that don't pass that expectation.
We have discovered that there is some test not cleaning up after itself on the engine test suite. We had an expectation of 0 records in the registration recently and we had to take it out because it was randomly failing for a dirty record not cleaned up in the table in certain occasions. I suggest we find the offending test adding an around hook to the test suite and checking after the run of every test that the database is clean, and fixing the test that don't pass that expectation.
https://travis-ci.com/DEFRA/waste-exemptions-engine/builds/120830154