async-lock icon indicating copy to clipboard operation
async-lock copied to clipboard

Failing unit test for maxOccupationtime

Open rogierschouten opened this issue 3 years ago • 1 comments

Hi @abozaralizadeh and @ThePiz apparently it slipped our attention but the unit test for maxOccupationtTime fails rightfully. Any chance for you to check this out?

rogierschouten avatar Oct 29 '22 10:10 rogierschouten

@rogierschouten I have just seen this issue and I believe you miss understood me about the issue I described with maxOccupationTime parameter, I didn't mean there is an issue with the tests (as far as I can see they all pass). I meant to say that there is a logical issue with this parameter: if options are passed through the acquire method for the same key if the first function to run passes maxOccupationTime parameter and the second does not then in case the first functions timer throws the exception during the execution then the second function will be blocked in await forever (it doesn't have a timeout) and the queue will not be purged as well.

p.s. when you replied about the tests I assumed you meant you'll add a test for that

mottymilshtein avatar Oct 30 '22 17:10 mottymilshtein