-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Expand file tree
/
Copy pathtest-debugger-probe-timeout.js
More file actions
35 lines (32 loc) · 850 Bytes
/
test-debugger-probe-timeout.js
File metadata and controls
35 lines (32 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// This tests probe session timeout behavior and teardown.
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
const { spawnSyncAndExit } = require('../common/child_process');
const { assertProbeJson, timeoutScript } = require('../common/debugger-probe');
spawnSyncAndExit(process.execPath, [
'inspect',
'--json',
'--timeout=200',
'--probe', `${timeoutScript}:99`,
'--expr', '1',
timeoutScript,
], {
signal: null,
status: 1,
stdout(output) {
assertProbeJson(output, {
v: 1,
probes: [{ expr: '1', target: [timeoutScript, 99] }],
results: [{
event: 'timeout',
pending: [0],
error: {
code: 'probe_timeout',
message: `Timed out after 200ms waiting for probes: ${timeoutScript}:99`,
},
}],
});
},
trim: true,
});