A more generic version of eventually
in asynctest
#1044
Labels
Marketplace
See https://miro.com/app/board/uXjVNZ03E-c=/ for details
eventually
in asynctest
#1044
In #922, a more generic version of
eventually
has been introduced to have a bit more control over awaiting for asynchronous tasks in tests.The version was called
eventuallyS
whereS
stands for slow. It changes thetimeout
argument to use seconds instead of milliseconds (default10
), introducesstep
argument to adjust the waiting time between testing the condition (default5
, meaning5s
) and optionalcancelExpression
to interrupt the waiting loop and returnfalse
whencancelExpression
evaluates totrue
:The intention is to use the above function to replace the original implementation.
Two functions need to be changed in the
asynctest
module:asynctest/private/chronos/eventually.nim
asynctest/asynctest/private/asyncdispatch/eventually.nim
Estimated cost: 1 (ideal working day)
The text was updated successfully, but these errors were encountered: