diff options
author | Petar Kukolj <petarkukolj3@yahoo.com> | 2019-01-04 00:13:00 +0100 |
---|---|---|
committer | Petar Kukolj <petarkukolj3@yahoo.com> | 2019-01-04 00:13:00 +0100 |
commit | dfcb16d77b5e9b7ea3f5d19e528c9f4950eb4520 (patch) | |
tree | 4c96dc41c2c935d7102694f56e02bd5ffe5eaf9e /app | |
parent | ebc02009682d8ad0c724ed3f6d13f97e6668b622 (diff) | |
download | AntennaPod-dfcb16d77b5e9b7ea3f5d19e528c9f4950eb4520.zip |
Include Awaitility in app module and properly fix the added test
Diffstat (limited to 'app')
-rw-r--r-- | app/build.gradle | 1 | ||||
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/storage/DBWriterTest.java | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/app/build.gradle b/app/build.gradle index d8602d55e..60399f0ca 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -186,6 +186,7 @@ dependencies { implementation 'com.github.mfietz:fyydlin:v0.3' implementation 'com.github.ByteHamster:SearchPreference:v1.0.8' + implementation "org.awaitility:awaitility:$awaitilityVersion" androidTestImplementation "com.jayway.android.robotium:robotium-solo:$robotiumSoloVersion" androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' diff --git a/app/src/androidTest/java/de/test/antennapod/storage/DBWriterTest.java b/app/src/androidTest/java/de/test/antennapod/storage/DBWriterTest.java index aae2583de..b80482c53 100644 --- a/app/src/androidTest/java/de/test/antennapod/storage/DBWriterTest.java +++ b/app/src/androidTest/java/de/test/antennapod/storage/DBWriterTest.java @@ -25,6 +25,8 @@ import de.danoeh.antennapod.core.storage.DBReader; import de.danoeh.antennapod.core.storage.DBWriter; import de.danoeh.antennapod.core.storage.PodDBAdapter; +import org.awaitility.Awaitility; + /** * Test class for DBWriter */ @@ -161,7 +163,7 @@ public class DBWriterTest extends InstrumentationTestCase { assertTrue(queue.size() != 0); DBWriter.deleteFeedMediaOfItem(getInstrumentation().getTargetContext(), media.getId()); - Thread.sleep(200); + Awaitility.await().until(() -> dest.exists() == false); media = DBReader.getFeedMedia(media.getId()); assertNotNull(media); assertFalse(dest.exists()); |