One of the timeout tests fails randomly. In this test we generate 100 timeouts and assert that we got at least more than 70% unique timeout ranges generated. This test fails randomly because we sometimes generate less unique/random timeouts for a given range. There are some possible causes for this:
- It could be that our test just makes an assumption that is just way to high, as we only generate timeouts within
150 and 300 but that would still leave 150 possibilities.
- Our timeout algorithm is flawed.
- The timeout is flawed.
With Math.random() analysis like this: https://github.com/nquinlan/better-random-numbers-for-javascript-mirror in the back of heads, it might be wise to come up something more random.
One of the timeout tests fails randomly. In this test we generate 100 timeouts and assert that we got at least more than 70% unique timeout ranges generated. This test fails randomly because we sometimes generate less unique/random timeouts for a given range. There are some possible causes for this:
150and300but that would still leave 150 possibilities.With
Math.random()analysis like this: https://github.com/nquinlan/better-random-numbers-for-javascript-mirror in the back of heads, it might be wise to come up something more random.