Bug 465490 - Intermittent time out after test_0051_general.js: test_0110_general.js hangs randomly.

This commit is contained in:
Robert Strong 2009-04-13 20:19:03 -07:00
Родитель 683e3b3f7c
Коммит f0a4268a5c
4 изменённых файлов: 26 добавлений и 32 удалений

Просмотреть файл

@ -1,6 +0,0 @@
<?xml version="1.0"?>
<updates>
<update type="major" version="4.0" extensionVersion="4.0" buildID="20080811053724" licenseURL="http://dummylicense" detailsURL="http://dummydetails/">
<patch type="complete" URL="http://localhost:4444/data/aus-0110_general-1.mar" hashFunction="SHA1" hashValue="246522844a98564e831d89b8c9243efca90f687e" size="1444"/>
</update>
</updates>

Просмотреть файл

@ -1,6 +0,0 @@
<?xml version="1.0"?>
<updates>
<update type="major" version="4.0" extensionVersion="4.0" buildID="20080811053724" licenseURL="http://dummylicense" detailsURL="http://dummydetails/">
<patch type="partial" URL="http://localhost:4444/data/aus-0110_general-2.mar" hashFunction="SHA1" hashValue="62eeb2a3b4d0c46589400dd8e6806f707da05c3e" size="1255"/>
</update>
</updates>

Просмотреть файл

@ -82,14 +82,18 @@ function run_test() {
// Use a directory outside of dist/bin to lessen the garbage in dist/bin
var updatesSubDir = do_get_cwd();
updatesSubDir.append("app_dir");
updatesSubDir.append("updates");
updatesSubDir.append("0");
updatesSubDir.append("0110_complete_mar");
dump("Testing: cleanup of the updates directory used to test\n");
try {
// Mac OS X intermittently fails when removing the dir where the updater
// binary was launched.
if (updatesSubDir.exists())
updatesSubDir.remove(true);
do_check_false(updatesSubDir.exists());
}
catch (e) {
dump("Unable to remove directory\npath: " + updatesSubDir.path +
"\nException: " + e + "\n");
}
var mar = do_get_file("data/aus-0110_general-1.mar");
mar.copyTo(updatesSubDir, "update.mar");
@ -109,6 +113,8 @@ function run_test() {
do_check_eq(getFileBytes(srcImage), getFileBytes(refImage));
try {
// Mac OS X intermittently fails when removing the dir where the updater
// binary was launched.
if (updatesSubDir.exists())
updatesSubDir.remove(true);
}
@ -116,9 +122,6 @@ function run_test() {
dump("Unable to remove directory\npath: " + updatesSubDir.path +
"\nException: " + e + "\n");
}
dump("Testing: successful removal of the updates subdirectory where the " +
"updater binary was launched\n");
do_check_false(updatesSubDir.exists());
}
// Launches the updater binary to apply a mar file

Просмотреть файл

@ -89,14 +89,18 @@ function run_test() {
// Use a directory outside of dist/bin to lessen the garbage in dist/bin
var updatesSubDir = do_get_cwd();
updatesSubDir.append("app_dir");
updatesSubDir.append("updates");
updatesSubDir.append("0");
updatesSubDir.append("0111_partial_mar");
dump("Testing: cleanup of the updates directory used to test\n");
try {
// Mac OS X intermittently fails when removing the dir where the updater
// binary was launched.
if (updatesSubDir.exists())
updatesSubDir.remove(true);
do_check_false(updatesSubDir.exists());
}
catch (e) {
dump("Unable to remove directory\npath: " + updatesSubDir.path +
"\nException: " + e + "\n");
}
var mar = do_get_file("data/aus-0110_general-2.mar");
mar.copyTo(updatesSubDir, "update.mar");
@ -118,6 +122,8 @@ function run_test() {
do_check_eq(getFileBytes(srcImage), getFileBytes(refImage));
try {
// Mac OS X intermittently fails when removing the dir where the updater
// binary was launched.
if (updatesSubDir.exists())
updatesSubDir.remove(true);
}
@ -125,9 +131,6 @@ function run_test() {
dump("Unable to remove directory\npath: " + updatesSubDir.path +
"\nException: " + e + "\n");
}
dump("Testing: successful removal of the updates subdirectory where the " +
"updater binary was launched\n");
do_check_false(updatesSubDir.exists());
}
// Launches the updater binary to apply a mar file