diff options
author | louiz’ <louiz@louiz.org> | 2018-07-25 13:52:52 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2018-07-25 13:52:52 +0200 |
commit | 3b96b2e0b1cdd3f1a671b601833dfd5bb6bf769a (patch) | |
tree | b61d365701bc8ea5e80a88bb2ea615015f9381cf /tests/end_to_end | |
parent | 780eea53e72f96d7d062f0d1c0d6d2a6ba5e5bed (diff) | |
download | biboumi-3b96b2e0b1cdd3f1a671b601833dfd5bb6bf769a.tar.gz biboumi-3b96b2e0b1cdd3f1a671b601833dfd5bb6bf769a.tar.bz2 biboumi-3b96b2e0b1cdd3f1a671b601833dfd5bb6bf769a.tar.xz biboumi-3b96b2e0b1cdd3f1a671b601833dfd5bb6bf769a.zip |
Add a sleep in a e2e test
Reasons explained in the comment in the code
Diffstat (limited to 'tests/end_to_end')
-rw-r--r-- | tests/end_to_end/__main__.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py index cb354e5..1774e1e 100644 --- a/tests/end_to_end/__main__.py +++ b/tests/end_to_end/__main__.py @@ -1297,6 +1297,21 @@ if __name__ == '__main__': ("!/message[@id='']/body[text()='hello']", "/message[@id]/body[text()='hello']")), + # even though we reflect the message to XMPP only + # when we send it to IRC, there’s still a race + # condition if the XMPP client receives the + # reflection (and the IRC server didn’t yet receive + # it), then the new user joins the room, and then + # finally the IRC server sends the message to “all + # participants of the channel”, including the new + # one, that was not supposed to be there when the + # message was sent in the first place by the first + # XMPP user. There’s nothing we can do about it until + # all servers support the echo-message IRCv3 + # extension… So, we just sleep a little bit before + # joining the room with the new user. + partial(sleep_for, 1), + # Second user joins partial(send_stanza, "<presence from='{jid_two}/{resource_one}' to='#foo%{irc_server_one}/{nick_two}' />"), |