Add test for timeout handling