Add timeout to stream with testing

Fixes Issue #1803