Revert "Fix flaky 3PID inhibit error unit tests"#19916
Open
anoadragon453 wants to merge 3 commits into
Open
Conversation
MadLittleMods
approved these changes
Jul 7, 2026
Comment on lines
+329
to
+333
| # Note: The endpoint intentionally adds up to 1000ms of jitter to avoid | ||
| # leaking whether the email address is bound to an account. | ||
| # | ||
| # This should be handled by `await_result` underneath, which has a | ||
| # 1000ms timeout. |
Contributor
There was a problem hiding this comment.
We could move this next to the relevant make_request inside _request_token(...)
Comment on lines
+752
to
761
| # Note: The endpoint intentionally adds up to 1000ms of jitter to avoid | ||
| # leaking whether the email address is bound to an account. | ||
| # | ||
| # This should be handled by `await_result` underneath, which has a | ||
| # 1000ms timeout. | ||
| channel = self.make_request( | ||
| "POST", | ||
| b"register/email/requestToken", | ||
| {"client_secret": "foobar", "email": email, "send_attempt": 1}, | ||
| # The endpoint intentionally adds up to 1000ms of jitter to avoid | ||
| # leaking whether the email address is already bound to an account. | ||
| timeout_ms=3000, | ||
| ) |
Contributor
There was a problem hiding this comment.
Current comment works.
I could also see this explicit version being good:
Suggested change
| # Note: The endpoint intentionally adds up to 1000ms of jitter to avoid | |
| # leaking whether the email address is bound to an account. | |
| # | |
| # This should be handled by `await_result` underneath, which has a | |
| # 1000ms timeout. | |
| channel = self.make_request( | |
| "POST", | |
| b"register/email/requestToken", | |
| {"client_secret": "foobar", "email": email, "send_attempt": 1}, | |
| # The endpoint intentionally adds up to 1000ms of jitter to avoid | |
| # leaking whether the email address is already bound to an account. | |
| timeout_ms=3000, | |
| ) | |
| channel = self.make_request( | |
| "POST", | |
| b"register/email/requestToken", | |
| {"client_secret": "foobar", "email": email, "send_attempt": 1}, | |
| await_result=False, | |
| ) | |
| # Note: The endpoint intentionally adds up to 1000ms of jitter to avoid | |
| # leaking whether the email address is bound to an account. | |
| channel.await_result(timeout_ms=1000) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR reverts #19913, but leaves behind the comments in the tests noting that the endpoints have jitter.
See #19913 (comment) as for why. Kudos to @MadLittleMods for digging into the issue properly and providing an elegant fix in #19879!
928716e is the only new code here.