www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 025411f9b4e6f6d37eb9c98fc771b9990c4dd011
parent 72e0124e4e316260b7bf60c0987d63acef305a79
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu, 28 May 2015 22:22:47 -0400

Wait 250ms before quitting after tests, to avoid DB errors

Not crazy about this, but (at least on my system) it's an easy way to
avoid DB errors due to interrupted transaction or query errors after the
DB connection was cleaned up. (I can reproduce those pretty reliably
right now by running collectionTreeView tests alone.)

Diffstat:
Mtest/content/runtests.js | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/test/content/runtests.js b/test/content/runtests.js @@ -13,9 +13,11 @@ function quit(failed) { OS.File.writeAtomic(FileUtils.getFile("ProfD", ["success"]).path, new Uint8Array(0)); } if(!ZoteroUnit.noquit) { - Components.classes['@mozilla.org/toolkit/app-startup;1']. - getService(Components.interfaces.nsIAppStartup). - quit(Components.interfaces.nsIAppStartup.eForceQuit); + setTimeout(function () { + Components.classes['@mozilla.org/toolkit/app-startup;1'] + .getService(Components.interfaces.nsIAppStartup) + .quit(Components.interfaces.nsIAppStartup.eForceQuit); + }, 250); } }