Bug 982201 - Don't give up so easily when constructing netmonitor statistics view during tests. r=past

In tests it doesn't make sense to give up after two seconds as we want to test
the actual feature - not that it can do everything in under two seconds which
is quite a long shot on debug builds.

The new 45 second timeout during tests matches the 45 second timeout of
mochitests which essentially makes it impossible for whenDataAvailable to
timeout during tests causing these false positives.
This commit is contained in:
Sami Jaktholm 2015-05-23 07:16:22 +03:00
Родитель d2b470167d
Коммит 269fbab986
1 изменённых файлов: 6 добавлений и 1 удалений

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

@ -799,7 +799,12 @@ function whenDataAvailable(aDataStore, aMandatoryFields) {
};
const WDA_DEFAULT_VERIFY_INTERVAL = 50; // ms
const WDA_DEFAULT_GIVE_UP_TIMEOUT = 2000; // ms
// Use longer timeout during testing as the tests need this process to succeed
// and two seconds is quite short on slow debug builds. The timeout here should
// be at least equal to the general mochitest timeout of 45 seconds so that this
// never gets hit during testing.
const WDA_DEFAULT_GIVE_UP_TIMEOUT = gDevTools.testing ? 45000 : 2000; // ms
/**
* Helper method for debugging.