Fixing async issue in db clean function for tests.