Fix valve tests

Cleaned up tests, made them clearer, increased sleep time to make the tests less flaky.