Skip to content

Commit 2315a40

Browse files
committed
Fix test
1 parent e0e9585 commit 2315a40

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Latest](https://github.com/cortex-lab/matlab-ci/commits/master) [3.2.0]
44

5+
## Modified
6+
7+
- if SIGTERM fails to end process(es) in under a minute, SIGKILL is sent
8+
59
## Added
610

711
- git workflow

test/lib.test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,13 @@ describe('Test startJobTimer:', function () {
342342

343343
it('expect SIGKILL', function (done) {
344344
// Test second timeout for tests where SIGTERM fails to end process
345+
let nCalls = 0;
345346
const childProcess = {
346347
kill: (sig) => {
347-
if (sig === 'SIGKILL') {
348+
nCalls++;
349+
if (nCalls === 2) {
350+
expect(sig).eq('SIGKILL');
348351
done();
349-
} else {
350-
done(new Error(`Expected 'SIGKILL', got '${sig}'`));
351352
}
352353
},
353354
pid: 10108

0 commit comments

Comments
 (0)