tests around read_with_timeout