cache index names
add get_index_client() for interoperability
use ok_() instead of assert
add test for success after retryable failure
split out try blocks