redux-saga-test-plan icon indicating copy to clipboard operation
redux-saga-test-plan copied to clipboard

Saga exceeded async timeout not helpful

Open bdurrer opened this issue 4 years ago • 4 comments

The message Saga exceeded async timeout of 250ms indicates that there is an issue with a test. Somewhere, in the code base.

It should tell us what expectSaga triggered it or somehow give us the chance to find/debug it.

bdurrer avatar Dec 17 '19 13:12 bdurrer

Any news here? This message is very hard to debug.

pbylina avatar Dec 22 '20 08:12 pbylina

For those who are worried about the warnings: https://github.com/jfairbank/redux-saga-test-plan/blob/master/docs/integration-testing/timeout.md#silencing-warnings (most likely your code is just fine)

morzel85 avatar Dec 29 '20 10:12 morzel85

@morzel85 In our case the warning was almost always right, these often were test errors. But you have to count the warnings and compare to how many you expect to appear, because you don't know what and where it was caused

bdurrer avatar Dec 31 '20 12:12 bdurrer

I'm running into this too. It's very hard to figure out what timed out. In my case a spawn was being called, but I didn't really care and just need to add a new provider in the expectSaga.

But there are others in my project that I can't figure out. Each one ties up a thread in our test-runner for an extra 250ms, which can start to add up.

AaronV avatar Feb 01 '23 18:02 AaronV