diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2021-12-11 08:07:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-11 08:07:45 +0100 |
commit | 746e45b9ddf01cbb9d57ecb50d034a581a3b6fe1 (patch) | |
tree | 65f07d2e575e163897136362f2d35e7120c6cd37 | |
parent | 434cd2b79f2679ca8b01c10723e5663d3b265fb6 (diff) | |
parent | 55124402030136bc24019dd1a1ca4899d1fff487 (diff) | |
download | AntennaPod-746e45b9ddf01cbb9d57ecb50d034a581a3b6fe1.zip |
Merge pull request #5595 from ByteHamster/stable-test
Make queue removal test more stable
-rw-r--r-- | core/src/test/java/de/danoeh/antennapod/core/storage/DbWriterTest.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/src/test/java/de/danoeh/antennapod/core/storage/DbWriterTest.java b/core/src/test/java/de/danoeh/antennapod/core/storage/DbWriterTest.java index f70ed6e29..5e73773db 100644 --- a/core/src/test/java/de/danoeh/antennapod/core/storage/DbWriterTest.java +++ b/core/src/test/java/de/danoeh/antennapod/core/storage/DbWriterTest.java @@ -188,14 +188,13 @@ public class DbWriterTest { assertTrue(queue.size() != 0); DBWriter.deleteFeedMediaOfItem(context, media.getId()); - Awaitility.await().until(() -> !dest.exists()); + Awaitility.await().timeout(2, TimeUnit.SECONDS).until(() -> !dest.exists()); media = DBReader.getFeedMedia(media.getId()); assertNotNull(media); assertFalse(dest.exists()); assertFalse(media.isDownloaded()); assertNull(media.getFile_url()); - queue = DBReader.getQueue(); - assertEquals(0, queue.size()); + Awaitility.await().timeout(2, TimeUnit.SECONDS).until(() -> DBReader.getQueue().isEmpty()); } @Test |