diff options
author | Damian Minkov <damencho@jitsi.org> | 2013-07-24 17:10:01 +0300 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2013-07-24 17:10:01 +0300 |
commit | e464156bad70a4331a876a8376caace056811a63 (patch) | |
tree | ebf584aab73e4f4eaa6b58c55f62ab1fab894214 /test/net/java/sip/communicator/slick | |
parent | e130c9ece95aadd5c156f05259144c5b695e457c (diff) | |
download | jitsi-e464156bad70a4331a876a8376caace056811a63.zip jitsi-e464156bad70a4331a876a8376caace056811a63.tar.gz jitsi-e464156bad70a4331a876a8376caace056811a63.tar.bz2 |
Fixes wrong print and adds some waits.
Diffstat (limited to 'test/net/java/sip/communicator/slick')
-rw-r--r-- | test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java b/test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java index edaf188..7e8ba1a 100644 --- a/test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java +++ b/test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java @@ -198,39 +198,23 @@ public class TestMsgHistoryService mockBImOpSet.deliverMessage(TEST_CONTACT_NAME_1, messagesToSend[0]); mockBImOpSet.deliverMessage(TEST_CONTACT_NAME_2, messagesToSend[0]); + waitWrite(100); + TestMsgHistoryService.controlDate1 = new Date(); logger.info("controlDate1:" + controlDate1.getTime()); - Object lock = new Object(); - synchronized (lock) - { - // wait a moment - try - { - lock.wait(200); - } - catch (InterruptedException ex) - { - } - } + waitWrite(100); mockBImOpSet.deliverMessage(TEST_CONTACT_NAME_1, messagesToSend[1]); mockBImOpSet.deliverMessage(TEST_CONTACT_NAME_2, messagesToSend[2]); + waitWrite(100); + TestMsgHistoryService.controlDate2 = new Date(); - logger.info("controlDate2:" + controlDate1.getTime()); - synchronized (lock) - { - // wait a moment - try - { - lock.wait(200); - } - catch (InterruptedException ex) - { - } - } + logger.info("controlDate2:" + controlDate2.getTime()); + + waitWrite(100); mockBImOpSet.deliverMessage(TEST_CONTACT_NAME_1, messagesToSend[3]); @@ -437,6 +421,8 @@ public class TestMsgHistoryService room.sendMessage(messagesToSend[2]); + waitWrite(100); + TestMsgHistoryService.controlDate2 = new Date(); logger.info("controlDate2:" + controlDate2.getTime()); |