Bug 1415911 - Fix intermittent test_MigrationUtils_timedRetry failure r?Gijs draft
authorDoug Thayer <dothayer@mozilla.com>
Mon, 04 Dec 2017 14:48:17 -0800
changeset 711230 3d3f2f07098c37a0fe2e2acf036e161efe9b5d78
parent 707182 5be384bcf00191f97d32b4ac3ecd1b85ec7b18e1
child 743770 926c2dcadd77781ff34f06331a321d0f293c6e22
push id93027
push userbmo:dothayer@mozilla.com
push dateWed, 13 Dec 2017 16:08:14 +0000
reviewersGijs
bugs1415911
milestone59.0a1
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
browser/components/migration/tests/unit/test_MigrationUtils_timedRetry.js
--- 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;
 });