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.
This commit is contained in:
Katrina Uychaco
2016-02-11 13:57:20 -08:00
parent 8e33f8bf5b
commit c2ff75f94b

View File

@@ -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