mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Upload tests (#2086)
* Add unit tests for upload flows * Tests for upload model * Test fixes * Remove empty test cases * Changes based on comments
This commit is contained in:
parent
1070137741
commit
f3a90c004c
19 changed files with 533 additions and 252 deletions
|
|
@ -119,7 +119,7 @@ public class CommonsApplication extends Application {
|
|||
ContributionUtils.emptyTemporaryDirectory();
|
||||
|
||||
initAcra();
|
||||
if (BuildConfig.DEBUG) {
|
||||
if (BuildConfig.DEBUG && !isRoboUnitTest()) {
|
||||
Stetho.initializeWithDefaults(this);
|
||||
}
|
||||
|
||||
|
|
@ -162,6 +162,10 @@ public class CommonsApplication extends Application {
|
|||
Thread.setDefaultUncaughtExceptionHandler(exceptionHandler);
|
||||
}
|
||||
|
||||
public static boolean isRoboUnitTest() {
|
||||
return "robolectric".equals(Build.FINGERPRINT);
|
||||
}
|
||||
|
||||
private ThreadPoolService getFileLoggingThreadPool() {
|
||||
return new ThreadPoolService.Builder("file-logging-thread")
|
||||
.setPriority(Process.THREAD_PRIORITY_LOWEST)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue