Build: #946 was successful
Job: Default Job was successful
Code commits
Smack (master)
-
Florian Schmaus c322ce804693f7973649d9ba1cb2aa399a3975ba
Merge pull request #601 from guusdk/sint_muc-guarantee-order
[sint] Refactor test to ensure stanza order -
Guus der Kinderen 0c9d521084fe63ea4bd38d53efeb9a43ac128c82 m
[sint] Refactor test to ensure stanza order
The test that's modified in this commit asserts that upon MUC join, stanzas are received in a particular order.
The previous implementation depended on several event listeners (one for presence, one for messages) that did not always fire in the same order in which the corresponding stanzas arrived. This made the approach unsuitable to reliably test the order in which stanzas arrive.
This commit stops using Smack's MUC API when trying to collect the order in which stanzas arrive. Instead, it joins a chatroom and listens for its stanzas using basic stanza handling. As this uses exactly one stanza listener, that's guaranteed to be invoked in order of stanza arrival, any synchronicity issue in the previous implementation no longer applies.