aboutsummaryrefslogtreecommitdiffstats
path: root/test/net/java/sip/communicator/slick/msghistory
diff options
context:
space:
mode:
Diffstat (limited to 'test/net/java/sip/communicator/slick/msghistory')
-rw-r--r--test/net/java/sip/communicator/slick/msghistory/TestMsgHistoryService.java34
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());