mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2024-12-12 08:56:15 +01:00
Fix tests sometimes crashing because sync is not initialized (#7490)
This commit is contained in:
parent
047a31b799
commit
26c0deaa09
@ -16,6 +16,8 @@ import de.danoeh.antennapod.model.feed.Feed;
|
|||||||
import de.danoeh.antennapod.model.feed.FeedItem;
|
import de.danoeh.antennapod.model.feed.FeedItem;
|
||||||
import de.danoeh.antennapod.model.feed.FeedMedia;
|
import de.danoeh.antennapod.model.feed.FeedMedia;
|
||||||
import de.danoeh.antennapod.net.download.serviceinterface.AutoDownloadManager;
|
import de.danoeh.antennapod.net.download.serviceinterface.AutoDownloadManager;
|
||||||
|
import de.danoeh.antennapod.net.sync.serviceinterface.SynchronizationQueue;
|
||||||
|
import de.danoeh.antennapod.net.sync.serviceinterface.SynchronizationQueueStub;
|
||||||
import de.danoeh.antennapod.storage.database.DBWriter;
|
import de.danoeh.antennapod.storage.database.DBWriter;
|
||||||
import de.danoeh.antennapod.storage.preferences.PlaybackPreferences;
|
import de.danoeh.antennapod.storage.preferences.PlaybackPreferences;
|
||||||
import de.danoeh.antennapod.storage.preferences.SynchronizationSettings;
|
import de.danoeh.antennapod.storage.preferences.SynchronizationSettings;
|
||||||
@ -83,6 +85,7 @@ public class DbCleanupTests {
|
|||||||
PlaybackPreferences.init(context);
|
PlaybackPreferences.init(context);
|
||||||
SynchronizationSettings.init(context);
|
SynchronizationSettings.init(context);
|
||||||
AutoDownloadManager.setInstance(new AutoDownloadManagerImpl());
|
AutoDownloadManager.setInstance(new AutoDownloadManagerImpl());
|
||||||
|
SynchronizationQueue.setInstance(new SynchronizationQueueStub());
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
@ -8,6 +8,8 @@ import java.util.List;
|
|||||||
import de.danoeh.antennapod.model.feed.Feed;
|
import de.danoeh.antennapod.model.feed.Feed;
|
||||||
import de.danoeh.antennapod.model.feed.FeedItem;
|
import de.danoeh.antennapod.model.feed.FeedItem;
|
||||||
import de.danoeh.antennapod.net.download.serviceinterface.AutoDownloadManager;
|
import de.danoeh.antennapod.net.download.serviceinterface.AutoDownloadManager;
|
||||||
|
import de.danoeh.antennapod.net.sync.serviceinterface.SynchronizationQueue;
|
||||||
|
import de.danoeh.antennapod.net.sync.serviceinterface.SynchronizationQueueStub;
|
||||||
import de.danoeh.antennapod.storage.preferences.UserPreferences;
|
import de.danoeh.antennapod.storage.preferences.UserPreferences;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@ -26,6 +28,7 @@ public class DbQueueCleanupAlgorithmTest extends DbCleanupTests {
|
|||||||
public DbQueueCleanupAlgorithmTest() {
|
public DbQueueCleanupAlgorithmTest() {
|
||||||
setCleanupAlgorithm(UserPreferences.EPISODE_CLEANUP_QUEUE);
|
setCleanupAlgorithm(UserPreferences.EPISODE_CLEANUP_QUEUE);
|
||||||
AutoDownloadManager.setInstance(new AutoDownloadManagerImpl());
|
AutoDownloadManager.setInstance(new AutoDownloadManagerImpl());
|
||||||
|
SynchronizationQueue.setInstance(new SynchronizationQueueStub());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user