fixes to test cleanup routine
Merge pull request #3675 from eileenmcnaughton/test-fix

fixes to test cleanup routine