hopfenspace / MateBot

Micro service providing an API for MateBot clients

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix unittest race condition while checking callback requests

CrsiX opened this issue · comments

commented

b1c3843 introduced a quick fix to prevent failing API unittests due to race conditions with the callback check, because the evaluation of the received callbacks may be faster than receiving the callbacks from the server. Therefore, the API unittest would fail, even if the callback was actually happening and correctly performed.
That fix uses a static delay using time.sleep(), which is pretty ugly (but, at least it works).