Skip to content

Commit 88fcdaa

Browse files
committed
INT-958 add pretest task to invoke mongodb-runner, reap old Electron procs (#368)
* INT-958 add pretest task to invoke mongodb-runner, and reap old Electron procs Avoid downloading a stable release of MongoDB during before() hook of a test; this will likely cause a test timeout on Evergreen. Reap old Electron procs on Evergreen * evergreen: add exec_timeout_secs at 30 min (cherry picked from commit 2efca1c)
1 parent 54e20bf commit 88fcdaa

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.evergreen.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
stepback: false
1010

11+
# Upper bound on any shell.exec task. 30 min should be plenty of time.
12+
exec_timeout_secs: 1800
13+
1114
variables:
1215
# function "save release variants" is conditional on the following
1316
# -> all except ubuntu
@@ -127,10 +130,12 @@ functions:
127130
${npm|npm} run check
128131
129132
# Create a release build
130-
${npm|npm} run prepublish;
133+
npm run release;
134+
ls -alh dist/
131135
132136
# Test the release build
133-
${npm|npm} run test-unit;
137+
npm run test-unit;
138+
# npm run test
134139
EOF_BUILD_SH
135140
#
136141
# Use ".", not "source" below to read script. Required for /bin/sh on Ubuntu.
@@ -242,6 +247,7 @@ buildvariants:
242247
expansions:
243248
build_via_local_tunnel: true
244249
fetch_npm_tarball: node-v5.5.0-npm-3.3.12-darwin-x64.tgz
250+
killall_evergreen: 'pkill -9 Electron; pkill -9 mongod; pkill -9 mongos; pkill -9 mongo'
245251
node_path: "$(pwd)/.deps/bin"
246252
installer_content_type: "application/x-apple-diskimage"
247253
installer_filename: "MongoDB Compass.dmg"
@@ -256,6 +262,7 @@ buildvariants:
256262
- "windows-64-vs2013-test"
257263
expansions:
258264
fetch_npm_tarball: node-v5.5.0-npm-3.3.12-windows-x64.tgz
265+
killall_evergreen: 'pkill -9 Electron; pkill -9 mongod; pkill -9 mongos; pkill -9 mongo'
259266
node_path: "$(pwd)/.deps"
260267
installer_content_type: "application/octet-stream"
261268
installer_filename: "MongoDBCompassSetup.exe"
@@ -271,6 +278,7 @@ buildvariants:
271278
- "ubuntu1404-test"
272279
expansions:
273280
fetch_npm_tarball: node-v5.5.0-npm-3.3.12-linux-x64.tgz
281+
killall_evergreen: 'pkill -9 electron; pkill -9 mongod; pkill -9 mongos; pkill -9 mongo'
274282
node_path: "$(pwd)/.deps/bin"
275283
compile_env: CC=/opt/mongodbtoolchain/bin/gcc CXX=/opt/mongodbtoolchain/bin/g++
276284
num_cores: $(grep -c ^processor /proc/cpuinfo)

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"clean": "npm run postuninstall",
3838
"compile-ui": "node scripts/compile-ui.js",
3939
"fmt": "mongodb-js-fmt ./*.js src/{**/*.js,*.js} test/{**/*.js,*.js} scripts/*.js",
40+
"pretest": "mongodb-runner start && mongodb-runner stop",
4041
"release": "npm run prepublish",
4142
"test-functional": "npm test -- --functional",
4243
"test-unit": "npm test -- --unit",

0 commit comments

Comments
 (0)