Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sinttest] Add roster tests that are driven by presence stanzas #519

Merged
merged 2 commits into from
Apr 30, 2024

Conversation

guusdk
Copy link
Member

@guusdk guusdk commented Feb 23, 2022

RFC-6121 defines server-sided behavior of the interaction between presence stanzas and rosters.
This commit adds tests for that behavior.

@guusdk guusdk force-pushed the SINT_roster-presence-based branch 8 times, most recently from eab7e2d to 8e22349 Compare February 23, 2022 19:44
@guusdk guusdk marked this pull request as ready for review February 23, 2022 19:52
@guusdk guusdk requested a review from Flowdalic July 11, 2022 07:57
@guusdk
Copy link
Member Author

guusdk commented Nov 26, 2023

This PR didn't have any apparant successful CI runs. I've rebased it to the current head of the master branch, which caused a run to start (and succeed).

@guusdk guusdk force-pushed the SINT_roster-presence-based branch from ec787f2 to a3c55cb Compare April 12, 2024 14:22
@guusdk
Copy link
Member Author

guusdk commented Apr 12, 2024

I've rebased this PR, to take in the latest new features available in Smack. Those have been applied to the new tests (eg: the tagging with specification references).

@Flowdalic provided feedback on this commit over IM, which has also been applied.

@guusdk
Copy link
Member Author

guusdk commented Apr 12, 2024

Note that Openfire 4.8.1. appears to have a bug that causes one of the tests added in this PR to fail: https://igniterealtime.atlassian.net/browse/OF-2822

@guusdk guusdk force-pushed the SINT_roster-presence-based branch 2 times, most recently from 4a406d6 to 3062dc1 Compare April 12, 2024 14:37
@guusdk guusdk changed the title SINT: Add roster tests that are driven by presence stanzas [sinttest] Add roster tests that are driven by presence stanzas Apr 12, 2024
Copy link
Member

@Flowdalic Flowdalic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, only some minor things.

@guusdk guusdk requested a review from Flowdalic April 22, 2024 17:18
@Flowdalic
Copy link
Member

LGTM, squash please

RFC-6121 defines server-sided behavior of the interaction between presence stanzas and rosters.
This commit adds tests for that behavior.
The implementation of the test that is being removed depends on a server
characteristic that will cause a loop of presence stanzas (which obviously is
bad). A RFC3921-compliant client can send an 'acknowledgement' after receiving
a presence 'subscribed' stanza, in the form of a presence 'subscribe' stanza.
See section 8.2 of RFC3921.

When a server implementation does not ignore this acknowledgement, the domain
of the recipient MUST (RFC6121 section 3.1.3) respond with a 'subscribed' on
behalf of the recipient (which is what the now removed test was verifying).
This can trigger the RFC3921-compliant sender to again receive 'subscribed',
that it again can acknowledge, which causes a loop.

To test RFC6121, the subscription state of the recipient must somehow be
modified to reflect a different state than that of the initiator. I'm not sure
if that is feasible with the SINT framework.
@guusdk guusdk force-pushed the SINT_roster-presence-based branch from 253d469 to ad75681 Compare April 26, 2024 08:56
@guusdk
Copy link
Member Author

guusdk commented Apr 26, 2024

Squashed. I've left the removal of one test as a distinct commit, as the commit message documents the rationale.

@Flowdalic Flowdalic added this pull request to the merge queue Apr 30, 2024
Merged via the queue into igniterealtime:master with commit 1bba38d Apr 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants