Closed AviVahl closed 7 years ago
Awesome! p.s. most likely extending timeout wouldn't help, I tried this in numerous variations.
@idoros reviewed this. (just realized this was not reflected in the PR)
and yes, timeout didn't help... disabled macOS in Travis and replaced with our own dedicated mac machine to run test:node on.
no need to test src/promise-utils.ts
? @idoros ?
I've "optimized" the promise retry loop to "look better" and it passes all tests:
while (!aborted && --retries >= -10) {
try {
const result = await promiseProvider();
return resolve(result);
} catch (e) {
lastError = e;
if (retries > 0) {
await delayedPromise(interval);
}
}
}
all in all great job, I'm going to copy some of it to other projects!
no need to test src/promise-utils.ts ?
Missed this and agree, although I would be happy not to write any of these promise helper functions. I'm sure we can find some tiny project to take it from.
@idoros There is (or supposed to be) a project that polyfills the Bluebird API on top of es6 promises. @benjamingr can you remind me how it's called?
HA! https://github.com/benjamingr/bluebird-api of course. @idoros @AviVahl check it out
@AviVahl the test in our CI is flakey too.
Will check
This PR should fix the "Core3 Regular Test".