From c2ff75f94bf1a0382ea46c01e8c39c7a1676cce9 Mon Sep 17 00:00:00 2001 From: Katrina Uychaco Date: Thu, 11 Feb 2016 13:57:20 -0800 Subject: [PATCH] Use `user-data-dir` with temp directory when running core tests This is to ensure successful database connection. Since core specs and package specs are run at the same time and both open an indexedDB connection, there were occasional core spec failures due to failed database connection. --- build/tasks/spec-task.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/tasks/spec-task.coffee b/build/tasks/spec-task.coffee index 892c92696..1d4be1e6f 100644 --- a/build/tasks/spec-task.coffee +++ b/build/tasks/spec-task.coffee @@ -1,5 +1,6 @@ fs = require 'fs' path = require 'path' +temp = require('temp').track() _ = require 'underscore-plus' async = require 'async' @@ -94,7 +95,7 @@ module.exports = (grunt) -> if process.platform in ['darwin', 'linux'] options = cmd: appPath - args: ['--test', "--resource-path=#{resourcePath}", coreSpecsPath] + args: ['--test', "--resource-path=#{resourcePath}", coreSpecsPath, "--user-data-dir=#{temp.mkdirSync('atom-user-data-dir')}"] opts: env: _.extend({}, process.env, ATOM_INTEGRATION_TESTS_ENABLED: true