added tests for timeouts
 fixed test [ timeouts on closed stream ]