From cd91098fdec1033ad665a54fd9038743059c234b Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Sat, 17 May 2014 21:31:52 +0200 Subject: Improved syncing speed for large amounts of feeds. fixes #371 - Bundle db operations in FeedSyncThread - Show "Processing downloads" message instead of "0 downloads left" --- .../de/test/antennapod/storage/DBTasksTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/instrumentationTest') diff --git a/src/instrumentationTest/de/test/antennapod/storage/DBTasksTest.java b/src/instrumentationTest/de/test/antennapod/storage/DBTasksTest.java index 9ab1481be..1e5afd0e3 100644 --- a/src/instrumentationTest/de/test/antennapod/storage/DBTasksTest.java +++ b/src/instrumentationTest/de/test/antennapod/storage/DBTasksTest.java @@ -202,7 +202,7 @@ public class DBTasksTest extends InstrumentationTestCase { for (int i = 0; i < NUM_ITEMS; i++) { feed.getItems().add(new FeedItem(0, "item " + i, "id " + i, "link " + i, new Date(), false, feed)); } - Feed newFeed = DBTasks.updateFeed(context, feed); + Feed newFeed = DBTasks.updateFeed(context, feed)[0]; assertTrue(newFeed == feed); assertTrue(feed.getId() != 0); @@ -222,8 +222,8 @@ public class DBTasksTest extends InstrumentationTestCase { feed1.setItems(new ArrayList()); feed2.setItems(new ArrayList()); - Feed savedFeed1 = DBTasks.updateFeed(context, feed1); - Feed savedFeed2 = DBTasks.updateFeed(context, feed2); + Feed savedFeed1 = DBTasks.updateFeed(context, feed1)[0]; + Feed savedFeed2 = DBTasks.updateFeed(context, feed2)[0]; assertTrue(savedFeed1.getId() != savedFeed2.getId()); } @@ -258,7 +258,7 @@ public class DBTasksTest extends InstrumentationTestCase { feed.getItems().add(0, new FeedItem(0, "item " + i, "id " + i, "link " + i, new Date(i), true, feed)); } - final Feed newFeed = DBTasks.updateFeed(context, feed); + final Feed newFeed = DBTasks.updateFeed(context, feed)[0]; assertTrue(feed != newFeed); updatedFeedTest(newFeed, feedID, itemIDs, NUM_ITEMS_OLD, NUM_ITEMS_NEW); -- cgit v1.2.3