Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Promise fulfilled delay failures #85

Closed
kitsonk opened this issue Nov 25, 2015 · 3 comments
Closed

Promise fulfilled delay failures #85

kitsonk opened this issue Nov 25, 2015 · 3 comments
Assignees
Milestone

Comments

@kitsonk
Copy link
Member

kitsonk commented Nov 25, 2015

We are routinely getting something like the following. We need to figure out if the test is just being temperamental or if there is some problem we are regularly overrunning this timeout:

× firefox on Windows 10 - unit tests - async/timing - delay() - resolves a promise after the given timeout (0.465s)
AssertionError: expected 462 to be close to 250 +/- 25
  at AssertionError  <__intern/node_modules/chai/chai.js:4760:18>
  at [2]</module.exports/Assertion.prototype.assert  <__intern/node_modules/chai/chai.js:203:1>
  at [4]</module.exports/<  <__intern/node_modules/chai/chai.js:1727:1>
  at [9]</module.exports/ctx[name]  <__intern/node_modules/chai/chai.js:3475:18>
  at [5]</module.exports/assert.closeTo  <__intern/node_modules/chai/chai.js:2968:5>
  at ["delay()"]["resolves a promise after the given timeout"]/<  <_build/tests/unit/async/timing.js:21:21>
@mwistrand
Copy link

Given how setTimeout is scheduled, this isn't surprising in slower environments (e.g., a VM) with many tests being run together. I'm in the process of figuring out a margin that works better for this test.

@kitsonk
Copy link
Member Author

kitsonk commented Dec 7, 2015

Yeah, I seem to be getting inconsistent results, based on browser and testing provider. BrowserStack fail on some combinations, SauceLabs fails on a different set. I think in particular the test should have a wider range... The delay should never be faster but can obviously be significantly longer than specified in delay().

@kitsonk
Copy link
Member Author

kitsonk commented Dec 7, 2015

Seems like there are a few other things that are causing issues... On Sauce it seems like Firefox is pretty "slow".

kitsonk added a commit that referenced this issue Jan 13, 2016
Sometimes the client resolves exactly on the threshold for the
timing, but the assertion is isAbove which is strictly greater
than, therefore causing the test to fail incorrectly.

Refs #85
Refs #96
@dylans dylans added this to the Milestone 2 milestone Jan 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants