[streams] readable-stream-cancel.js "ReadableStream canceling an infinite stream" is flaky (#286)

Sometimes this test can be flaky.

In WebKit, when I translated it, I changed it to reinstate the timeout if we were still waiting, but it is not enough, as you can get the timeout, be in readable state and the readableStreamToArray function didn't have enough time to read any data, so we cancel and we don't read anything.

There I also reduced the timeout to make it faster from 150 to 50 and I wait now to have run the timeout both in readable and waiting or as many as 6 timeout executions, otherwise I reinstate the timeout.

If you think this makes any sense, I could prepare a pull request with these changes.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/286

Received on Wednesday, 18 February 2015 13:14:21 UTC