Skip to content

Commit 207e4bf

Browse files
DeviceInfracopybara-github
authored andcommitted
Internal change
PiperOrigin-RevId: 848042358
1 parent a3940fe commit 207e4bf

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

src/devtools/mobileharness/fe/v6/angular/karma.conf.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@
55
// This tells Karma to use the Chrome browser downloaded by Puppeteer
66
process.env.CHROME_BIN = require('puppeteer').executablePath();
77

8+
process.on('uncaughtException', (err) => {
9+
if (err.code === 'ERR_SERVER_NOT_RUNNING') {
10+
console.error('Caught ERR_SERVER_NOT_RUNNING. Ignoring to prevent pipeline break.', err);
11+
console.error(err);
12+
// Ideally, log this and trigger a non-zero exit code later if possible
13+
// without immediately crashing.
14+
// process.exit(1); // Consider exiting after logging, rather than continuing
15+
} else {
16+
console.error('Caught unhandled exception:', err);
17+
// For other uncaught exceptions, it's safer to exit.
18+
process.exit(1);
19+
}
20+
});
21+
22+
823
/**
924
* Karma configuration.
1025
* @param {!Object} config

src/devtools/mobileharness/fe/v6/angular/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "labconsole-fe",
3-
"version": "0.1.0",
3+
"version": "0.1.3",
44
"license": "Apache-2.0",
55
"scripts": {
66
"ng": "ng",
77
"start": "ng serve",
88
"build": "ng build",
99
"watch": "ng build --watch --configuration development",
10-
"test": "ng test --browsers ChromeHeadless --watch=false",
11-
"test:watch": "ng test"
10+
"test": "ng test",
11+
"test:ci": "ng test --browsers ChromeHeadless --watch=false"
1212
},
1313
"private": true,
1414
"dependencies": {

0 commit comments

Comments
 (0)