Skip to content

Commit c653a02

Browse files
authored
chore(e2e): don't try and stop compass-web if we didn't start it (#5550)
don't try and stop compass-web if we didn't start it
1 parent 463afb9 commit c653a02

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

packages/compass-e2e-tests/index.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,21 @@ function cleanup() {
107107
removeUserDataDir();
108108

109109
const disableStartStop = process.argv.includes('--disable-start-stop');
110+
const shouldTestCompassWeb = process.argv.includes('--test-compass-web');
110111

111112
if (!disableStartStop) {
112-
debug('Stopping compass-web');
113-
try {
114-
if (compassWeb.pid) {
115-
debug(`killing compass-web [${compassWeb.pid}]`);
116-
kill(compassWeb.pid);
117-
} else {
118-
debug('no pid for compass-web');
113+
if (shouldTestCompassWeb) {
114+
debug('Stopping compass-web');
115+
try {
116+
if (compassWeb.pid) {
117+
debug(`killing compass-web [${compassWeb.pid}]`);
118+
kill(compassWeb.pid);
119+
} else {
120+
debug('no pid for compass-web');
121+
}
122+
} catch (e) {
123+
debug('Failed to stop compass-web', e);
119124
}
120-
} catch (e) {
121-
debug('Failed to stop compass-web', e);
122125
}
123126

124127
debug('Stopping MongoDB server');

0 commit comments

Comments
 (0)