aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorIngo Bauersachs <ingo@jitsi.org>2014-11-27 15:51:47 +0100
committerIngo Bauersachs <ingo@jitsi.org>2014-11-27 16:14:23 +0100
commit52f83002bfb3e79b9945e07b799b2b8df96ebbd1 (patch)
treebd065ebdbf6dcf37951d2809b680e33b3f8881b6 /test
parentd2dfcd6c53996acf9b471589193279faa8e986ee (diff)
downloadjitsi-52f83002bfb3e79b9945e07b799b2b8df96ebbd1.zip
jitsi-52f83002bfb3e79b9945e07b799b2b8df96ebbd1.tar.gz
jitsi-52f83002bfb3e79b9945e07b799b2b8df96ebbd1.tar.bz2
Fix a race condition in the HistoryService
The check for existing history files was performed outside of the lock, so multiple threads attempted to create them and failed. This lead to missing entries in the logs.
Diffstat (limited to 'test')
-rw-r--r--test/net/java/sip/communicator/slick/history/TestHistoryService.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/test/net/java/sip/communicator/slick/history/TestHistoryService.java b/test/net/java/sip/communicator/slick/history/TestHistoryService.java
index 74ad5fb..c653e85 100644
--- a/test/net/java/sip/communicator/slick/history/TestHistoryService.java
+++ b/test/net/java/sip/communicator/slick/history/TestHistoryService.java
@@ -63,13 +63,8 @@ public class TestHistoryService extends TestCase {
HistoryID testID = HistoryID.createFromRawID(new String[] { "test",
"alltests" });
- if (!this.historyService.isHistoryExisting(testID))
- {
- this.history = this.historyService.createHistory(testID,
+ this.history = this.historyService.createHistory(testID,
recordStructure);
- } else {
- this.history = this.historyService.getHistory(testID);
- }
}
@Override