Make download manager tests more reliable.

Use larger files in tests. Using small files fails because downloads
complete too quickly. Using files that are too large fails because
downloads take too long.

Change-Id: I0786ece21e0acffa09dd8d85abf70ec4cde5e477
This commit is contained in:
Maxim Siniavine
2013-04-09 15:04:17 -07:00
parent 4a745e78bb
commit 5877687b38

View File

@@ -265,8 +265,8 @@ public class DownloadManagerTestApp extends DownloadManagerBaseTest {
* @throws Exception if unsuccessful
*/
public void runDownloadMultipleSwitching() throws Exception {
String filename = DOWNLOAD_500K_FILENAME;
long filesize = DOWNLOAD_500K_FILESIZE;
String filename = DOWNLOAD_5MB_FILENAME;
long filesize = DOWNLOAD_5MB_FILESIZE;
doCommonDownloadSetup();
String localDownloadDirectory = Environment.getExternalStorageDirectory().getPath();
@@ -340,8 +340,8 @@ public class DownloadManagerTestApp extends DownloadManagerBaseTest {
* @throws Exception if unsuccessful
*/
public void runDownloadMultipleWiFiEnableDisable() throws Exception {
String filename = DOWNLOAD_500K_FILENAME;
long filesize = DOWNLOAD_500K_FILESIZE;
String filename = DOWNLOAD_5MB_FILENAME;
long filesize = DOWNLOAD_5MB_FILESIZE;
doCommonDownloadSetup();
String localDownloadDirectory = Environment.getExternalStorageDirectory().getPath();
@@ -409,8 +409,8 @@ public class DownloadManagerTestApp extends DownloadManagerBaseTest {
* @throws Exception if unsuccessful
*/
public void runDownloadMultipleAirplaneModeEnableDisable() throws Exception {
String filename = DOWNLOAD_500K_FILENAME;
long filesize = DOWNLOAD_500K_FILESIZE;
String filename = DOWNLOAD_5MB_FILENAME;
long filesize = DOWNLOAD_5MB_FILESIZE;
// make sure WiFi is enabled, and airplane mode is not on
doCommonDownloadSetup();