connor4312 / cockatiel

🐦 A resilience and fault-handling library. Supports Backoffs, Retries, Circuit Breakers, Timeouts, Bulkhead Isolation, and Fallbacks.
MIT License
1.57k stars 48 forks source link

Await promise in TimeoutPolicy execute call using TimeoutStrategy.Agressive #17

Closed ekillops closed 4 years ago

connor4312 commented 4 years ago

Can you update the test case for this? Should be able to catch it by adding an await delay(0) before this line:

https://github.com/connor4312/cockatiel/blob/7704a2537d0fb9423712b6276fa89c171b371946/src/TimeoutPolicy.test.ts#L33

ekillops commented 4 years ago

Yeah, I can add that.

ekillops commented 4 years ago

The test is updated and I verified that your addition causes the test to fail when the promise is not awaited

connor4312 commented 4 years ago

Thanks! npm run fmt will fix up formatting, then this is good to merge 🚀

ekillops commented 4 years ago

Fixed