diff options
author | Damian Minkov <damencho@jitsi.org> | 2006-06-14 12:42:02 +0000 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2006-06-14 12:42:02 +0000 |
commit | e854930e452a76bdad6d1b0b1248fdd562124a9f (patch) | |
tree | 6b48249b427d2c14651184d750cf2741c519f7d0 /test/net/java/sip/communicator/slick/protocol/icq/IcqTesterAgent.java | |
parent | 9282f79fa89c65b0d2cfbeb6edabf4e1dcc1ec7d (diff) | |
download | jitsi-e854930e452a76bdad6d1b0b1248fdd562124a9f.zip jitsi-e854930e452a76bdad6d1b0b1248fdd562124a9f.tar.gz jitsi-e854930e452a76bdad6d1b0b1248fdd562124a9f.tar.bz2 |
Fixing tests of receive authorization requests.
Diffstat (limited to 'test/net/java/sip/communicator/slick/protocol/icq/IcqTesterAgent.java')
-rw-r--r-- | test/net/java/sip/communicator/slick/protocol/icq/IcqTesterAgent.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/net/java/sip/communicator/slick/protocol/icq/IcqTesterAgent.java b/test/net/java/sip/communicator/slick/protocol/icq/IcqTesterAgent.java index 1389e54..2580f6f 100644 --- a/test/net/java/sip/communicator/slick/protocol/icq/IcqTesterAgent.java +++ b/test/net/java/sip/communicator/slick/protocol/icq/IcqTesterAgent.java @@ -1160,7 +1160,9 @@ java.util.logging.Logger.getLogger("net.kano").setLevel(java.util.logging.Level. break; } - evtCollector.waitForRemovedBuddy(10000); + if(isDeleted) + evtCollector.waitForRemovedBuddy(10000); + joustSimBuddyList.removeLayoutListener(evtCollector); } @@ -1170,9 +1172,6 @@ java.util.logging.Logger.getLogger("net.kano").setLevel(java.util.logging.Level. MutableBuddyList joustSimBuddyList = (MutableBuddyList)conn.getSsiService().getBuddyList(); - LayoutEventCollector evtCollector = new LayoutEventCollector(); - joustSimBuddyList.addLayoutListener(evtCollector); - List grList = joustSimBuddyList.getGroups(); Iterator iter = grList.iterator(); @@ -1197,8 +1196,13 @@ java.util.logging.Logger.getLogger("net.kano").setLevel(java.util.logging.Level. ((MutableGroup)grList.get(0)).addBuddy(screenname); - evtCollector.waitForANewBuddy(10000); - joustSimBuddyList.removeLayoutListener(evtCollector); + Object lock = new Object(); + synchronized(lock){ + try{ + lock.wait(5000); + } + catch (Exception ex){} + } } /** @@ -1321,8 +1325,6 @@ java.util.logging.Logger.getLogger("net.kano").setLevel(java.util.logging.Level. { int command = packet.getCommand(); - // auth reply -// if (command == 0x001b) // auth request if (command == 25) { @@ -1384,8 +1386,6 @@ java.util.logging.Logger.getLogger("net.kano").setLevel(java.util.logging.Level. String uinToAskForAuth = buddyItem.getName(); - logger.trace("finding buddy : " + uinToAskForAuth); - Vector buddiesToBeAdded = new Vector(); BuddyAwaitingAuth newBuddy = new BuddyAwaitingAuth( @@ -1394,7 +1394,7 @@ java.util.logging.Logger.getLogger("net.kano").setLevel(java.util.logging.Level. CreateItemsCmd addCMD = new CreateItemsCmd(buddiesToBeAdded); - logger.trace("Adding buddy as awaiting authorization"); + logger.trace("Adding buddy as awaiting authorization " + uinToAskForAuth); MutableBuddyList joustSimBuddyList = (MutableBuddyList)conn.getSsiService().getBuddyList(); @@ -1404,7 +1404,7 @@ java.util.logging.Logger.getLogger("net.kano").setLevel(java.util.logging.Level. conn.getSsiService().sendSnac(addCMD); - evtCollector.waitForANewBuddy(15000); + evtCollector.waitForANewBuddy(20000); joustSimBuddyList.removeLayoutListener(evtCollector); logger.trace("Finished - Adding buddy as awaiting authorization"); |