mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 18:59:41 +02:00
Add Roster.createItem() and Roster.createItemAndRequestSubscription()
and deprecate createEntry(). createEntry() would also send a subscription request which may is suprising given that you can also create an roster item without having to send a subscription request out. This also fixes a bug in LowLevelRosterIntegrationTest.testPresenceEventListenersOffline() where createEntry() was used, which would also trigger a presence subscription request which in turn made the test fail if the SubscribeListener of ensureSubscribedTo() was not yet set up. So the test would fail depending on the timing.
This commit is contained in:
parent
c31e93a00f
commit
9c4e5d0330
4 changed files with 54 additions and 10 deletions
|
@ -164,7 +164,7 @@ public class RosterTest extends InitSmackIm {
|
|||
}
|
||||
};
|
||||
serverSimulator.start();
|
||||
roster.createEntry(contactJID, contactName, contactGroup);
|
||||
roster.createItemAndRequestSubscription(contactJID, contactName, contactGroup);
|
||||
serverSimulator.join();
|
||||
|
||||
// Check if an error occurred within the simulator
|
||||
|
@ -430,7 +430,7 @@ public class RosterTest extends InitSmackIm {
|
|||
}
|
||||
};
|
||||
serverSimulator.start();
|
||||
roster.createEntry(contactJID, contactName, contactGroup);
|
||||
roster.createItemAndRequestSubscription(contactJID, contactName, contactGroup);
|
||||
serverSimulator.join();
|
||||
|
||||
// Check if an error occurred within the simulator
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue