Add retry logic to tests

This should make them pass more consistently on windows