Implement context managers for client, integrated client, and hub, and make sure that timeout is sufficiently large to make a difference.