stream test: use receive

Use a receive with timeout rather than polling the mailbox.