Hi,
I have a strange problem while trying to do unit tests with smack and jive messenger 2.2.0
Basically I want to create a new account in the testcase and look for a shared group which is visible to all users. Afterwards the user account is deleted.
This works pretty well for the first time the test is executed. The second time there is no shared group in the users roster. Working with the debugger I can see that there are no iq packets sent from the server regarding the shared groups for the second time. This means instead of:
sent. This is reproducable until I restart the server. Then it works again one time and the second time it fails again. So it looks like the account is not completely deleted in the server cache or something like that. May be I did something wrong. The basic steps:
//create the account and log in
conn = new XMPPConnection(“localhost”);
conn.getAccountManager().createAccount(“visitor1”, “test”);
conn.close();
conn = new XMPPConnection(“localhost”);
conn.login(“visitor1”, “test”);
//test for the group
RosterGroup group = conn.getRoster().getGroup(“ABC”);
assertNotNull(“group should be visible in all rosters”,group);
//logout
finally {
try {
conn.getAccountManager().deleteAccount();
} catch (XMPPException e) {e.printStackTrace();}
conn.close();
}
Anything else I need to do?
Thanks,
Markus