Modify test_file_stream so that it tolerates more socket buffering than was previously allowed. Fixes #1199.