Bug 1415911 - Fix intermittent test_MigrationUtils_timedRetry failure r?Gijs
I'm not 100% sure this is the fix, but it looks like it could reasonably
cause the observed failure.
MozReview-Commit-ID: BRc6eUfbfbj
--- a/browser/components/migration/tests/unit/test_MigrationUtils_timedRetry.js
+++ b/browser/components/migration/tests/unit/test_MigrationUtils_timedRetry.js
@@ -5,22 +5,22 @@ XPCOMUtils.defineLazyModuleGetter(this,
let tmpFile = FileUtils.getDir("TmpD", [], true);
let dbConn;
add_task(async function setup() {
tmpFile.append("TestDB");
dbConn = await Sqlite.openConnection({ path: tmpFile.path });
- do_register_cleanup(() => {
- dbConn.close();
- OS.File.remove(tmpFile.path);
+ do_register_cleanup(async () => {
+ await dbConn.close();
+ await OS.File.remove(tmpFile.path);
});
});
add_task(async function testgetRowsFromDBWithoutLocksRetries() {
let promise = MigrationUtils.getRowsFromDBWithoutLocks(tmpFile.path,
"Temp DB",
"SELECT * FROM moz_temp_table");
await new Promise(resolve => do_timeout(50, resolve));
- dbConn.execute("CREATE TABLE moz_temp_table (id INTEGER PRIMARY KEY)");
+ await dbConn.execute("CREATE TABLE moz_temp_table (id INTEGER PRIMARY KEY)");
await promise;
});