-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix race conditions in TestTelegramConfirmedRequest
There were two different race conditions between logic in TestTelegramConfirmedRequest and TelegramAPIMock.GetUpdatesFunc and TelegramAPIMock.SendFunc: * GetUpdatesFunc may start before token was fetched, then it produces empty telegramUpdate response, which causes assertions in SendFunc to fail. * When token becomes used and removed from wait queue after successful login completion, then GetUpdatesFunc may be still called and new telegram update is created for same token. This breaks telegram update processing logic, and SendFunc gets called with the error parameter, which also breaks assertions.
- Loading branch information
Showing
2 changed files
with
53 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters