public class DownloadManagerStressTest extends DownloadManagerBaseTest
DownloadManagerBaseTest.DataType, DownloadManagerBaseTest.DownloadFileType, DownloadManagerBaseTest.LoggingRng, DownloadManagerBaseTest.MultipleDownloadsCompletedReceiver, DownloadManagerBaseTest.WiFiChangedReceiver
DEFAULT_FILE_SIZE, DEFAULT_FILENAME, DEFAULT_MAX_WAIT_TIME, DEFAULT_WAIT_POLL_TIME, DOWNLOAD_TO_DOWNLOAD_CACHE_DIR, DOWNLOAD_TO_SYSTEM_CACHE, FILE_BLOCK_READ_SIZE, HTTP_NOT_FOUND, HTTP_OK, HTTP_PARTIAL_CONTENT, HTTP_REDIRECT, HTTP_SERVICE_UNAVAILABLE, LOG_TAG, MAX_WAIT_FOR_DOWNLOAD_TIME, MAX_WAIT_FOR_LARGE_DOWNLOAD_TIME, mContext, mDownloadManager, mFileType, mReceiver, WAIT_FOR_DOWNLOAD_POLL_TIME
Constructor and Description |
---|
DownloadManagerStressTest() |
Modifier and Type | Method and Description |
---|---|
void |
setUp() |
void |
tearDown()
Make sure all resources are cleaned up and garbage collected before moving on to the next
test.
|
void |
testDownloadLargeFile()
Tests trying to download a large file (50M bytes).
|
void |
testDownloadToCacheWithAlmostFullCache()
Tests downloading a file to system cache when there isn't enough space in the system cache
to hold the entire file.
|
void |
testMultipleDownloads()
Attempts to download several files simultaneously
|
buildResponse, buildResponse, buildResponse, compareByteArrays, createFileOnSD, doBasicDownload, doCommonStandardEnqueue, doStandardEnqueue, doStandardEnqueue, doWaitForDownloadsOrTimeout, enqueueDownloadRequest, enqueueDownloadRequest, enqueueResponse, generateData, generateData, getCursor, getMimeMapping, getServerUri, logDBColumnData, registerNewMultipleDownloadsReceiver, removeAllCurrentDownloads, setAirplaneModeOn, setServerMimeType, setWiFiStateOn, timeoutWait, verifyAndCleanupSingleFileDownload, verifyFileContents, verifyFileContents, verifyFileSize, verifyInt, verifyString, waitForDownloadOrTimeout_skipNotification, waitForDownloadOrTimeout, waitForDownloadOrTimeout, waitForDownloadOrTimeoutNoThrow, waitForDownloadsOrTimeout, waitForDownloadToStart, waitForExternalStoreMount, waitForFileToGrow, waitForReceiverNotification, waitForReceiverNotifications
getInstrumentation, injectInsrumentation, injectInstrumentation, launchActivity, launchActivityWithIntent, runTest, runTestOnUiThread, sendKeys, sendKeys, sendRepeatedKeys
public void setUp() throws Exception
setUp
in class DownloadManagerBaseTest
Exception
public void tearDown() throws Exception
tearDown
in class InstrumentationTestCase
Exception
public void testMultipleDownloads() throws Exception
Exception
public void testDownloadLargeFile() throws Exception
Exception
public void testDownloadToCacheWithAlmostFullCache() throws Exception
Exception