You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have recently experienced the 2s mocha timeout, as specified here and discussed here.
This can be quite confusing, as was mentioned in the discussion I linked. Because kotlin's runTest has its own timeout, which is by default 60s, it is confusing when mocha throws its own (its not as bad if you know, but if you don't know its from Mocha its frustrating).
I know I can disable it with timeout = 0 in the mocha settings in gradle. But I want to ask here: is there any downside to that? Since kotlin's runTest installs its own timeout, you would think that kotlin would be default set the mocha timeout to be disabled. But since kotlin allows the mocha timeout to be at the default of 2s, I am just double checkign here if the mocha timeout serves any particular purpose that I might not be aware of.
Mainly, I am wondering if perhaps there was any concern that the kotlinx.coroutines timeout might not be thrown in any scenarios due to the thread blocking or something, in which case the mocha timeout must be relied on? I am not observing that to be the case or anything, but just imagining the reasons why the mocha timeout was left enabled by default this got me worried that it could be required in some way to unblock hanging tests or something?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have recently experienced the 2s mocha timeout, as specified here and discussed here.
This can be quite confusing, as was mentioned in the discussion I linked. Because kotlin's runTest has its own timeout, which is by default 60s, it is confusing when mocha throws its own (its not as bad if you know, but if you don't know its from Mocha its frustrating).
I know I can disable it with
timeout = 0
in the mocha settings in gradle. But I want to ask here: is there any downside to that? Since kotlin'srunTest
installs its own timeout, you would think that kotlin would be default set the mocha timeout to be disabled. But since kotlin allows the mocha timeout to be at the default of 2s, I am just double checkign here if the mocha timeout serves any particular purpose that I might not be aware of.Mainly, I am wondering if perhaps there was any concern that the kotlinx.coroutines timeout might not be thrown in any scenarios due to the thread blocking or something, in which case the mocha timeout must be relied on? I am not observing that to be the case or anything, but just imagining the reasons why the mocha timeout was left enabled by default this got me worried that it could be required in some way to unblock hanging tests or something?
Beta Was this translation helpful? Give feedback.
All reactions