Catch exception when subscribing user , if it exists

cusax-fix
Damian Minkov 19 years ago
parent ae7a91d0c8
commit 425e51443e

@ -169,8 +169,23 @@ public void prepareContactList()
o.wait(2000);
}
opSetPresence1.subscribe(fixture.userID2);
opSetPresence2.subscribe(fixture.userID1);
try
{
opSetPresence1.subscribe(fixture.userID2);
}
catch (OperationFailedException ex)
{
// the contact already exist its OK
}
try
{
opSetPresence2.subscribe(fixture.userID1);
}
catch (OperationFailedException ex1)
{
// the contact already exist its OK
}
synchronized(o)
{

@ -145,8 +145,19 @@ protected void setUp() throws Exception
public void prepareContactList() throws Exception
{
// be sure that contacts are in their lists
opSetPresence1.subscribe(fixture.userID2);
opSetPresence2.subscribe(fixture.userID1);
try{
opSetPresence1.subscribe(fixture.userID2);
}
catch (OperationFailedException ex){
// the contact already exist its OK
}
try{
opSetPresence2.subscribe(fixture.userID1);
}
catch (OperationFailedException ex1){
// the contact already exist its OK
}
Object o = new Object();
synchronized (o)

Loading…
Cancel
Save