canjs / can-route

Observable front-end application routing for CanJS.
https://canjs.com/doc/can-route.html
MIT License
10 stars 4 forks source link

Hashchange test fails intermittently #190

Closed phillipskevin closed 6 years ago

phillipskevin commented 6 years ago

This test: https://github.com/canjs/can-route/blob/a6f63522493b13e28a8efa502040b318fd25abfd/test/route-map-test.js#L43-L63

...is super flaky. It fails pretty regularly in the canjs/canjs saucelabs tests (here is one case where it failed twice out of 4 browsers). I assume it is also causing these sporadic failures in Greenkeeper PRs:

image

Most of these are also timeouts. My guess is there is an intermittent error thrown by this test which is causing all of these test suites to timeout without any error.

phillipskevin commented 6 years ago

The problem is that canRoute.start() finishes after the iframe.src is set.

image

I'm going to try to figure out a better solution than the 10ms setTimeout after calling start.

phillipskevin commented 6 years ago

More tests are failing with this same cause.