diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2013-10-12 00:30:24 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2013-10-12 00:30:24 +0200 |
commit | 05c62ca32feddaa9231ff1ef73b7bcb0be3e37f7 (patch) | |
tree | ad2ef618e17fddb156543a1fe9285ed1c89f17bf /src/instrumentationTest/de/test/antennapod | |
parent | df9f6661e140ca7ea5fa24897b74071f49f9e86d (diff) | |
download | AntennaPod-05c62ca32feddaa9231ff1ef73b7bcb0be3e37f7.zip |
Fixed race condition in testMarkAllItemsReadSameFeed
Diffstat (limited to 'src/instrumentationTest/de/test/antennapod')
-rw-r--r-- | src/instrumentationTest/de/test/antennapod/storage/DBWriterTest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/instrumentationTest/de/test/antennapod/storage/DBWriterTest.java b/src/instrumentationTest/de/test/antennapod/storage/DBWriterTest.java index 0483a3084..429903cba 100644 --- a/src/instrumentationTest/de/test/antennapod/storage/DBWriterTest.java +++ b/src/instrumentationTest/de/test/antennapod/storage/DBWriterTest.java @@ -708,7 +708,7 @@ public class DBWriterTest extends InstrumentationTestCase { } } - public void testMarkAllItemsReadSameFeed() { + public void testMarkAllItemsReadSameFeed() throws InterruptedException, ExecutionException, TimeoutException { final Context context = getInstrumentation().getTargetContext(); final int NUM_ITEMS = 10; Feed feed = new Feed("url", new Date(), "title"); @@ -728,7 +728,7 @@ public class DBWriterTest extends InstrumentationTestCase { assertTrue(item.getId() != 0); } - DBWriter.markAllItemsRead(context); + DBWriter.markAllItemsRead(context).get(TIMEOUT, TimeUnit.SECONDS); List<FeedItem> loadedItems = DBReader.getFeedItemList(context, feed); for (FeedItem item : loadedItems) { assertTrue(item.isRead()); |