Wait for index to be in the open state before using in tests (for Travis)