aboutsummaryrefslogtreecommitdiff
path: root/tests/drivers/protocol_growth_test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/drivers/protocol_growth_test.js')
-rw-r--r--tests/drivers/protocol_growth_test.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/drivers/protocol_growth_test.js b/tests/drivers/protocol_growth_test.js
index 64015d8..d8dff6c 100644
--- a/tests/drivers/protocol_growth_test.js
+++ b/tests/drivers/protocol_growth_test.js
@@ -1,4 +1,6 @@
// preserve long request identifiers and ignore deeply nested unknown json fields.
+// interpreted hosts (no jit) are far slower; ZC_TEST_TIMEOUT_SCALE stretches every deadline
+const TIMEOUT_SCALE = Number(process.env.ZC_TEST_TIMEOUT_SCALE) || 1;
const assert = require('assert');
const cp = require('child_process');
const target = process.argv[2];
@@ -15,7 +17,7 @@ for (let i = 0; i < 24; i++) messages.push({ jsonrpc: '2.0', method: 'textDocume
text: 'enum choice { item { int value; }, empty };\nfn main() { choice*.m p = choice.item(7); return p.item_value; }\n',
} } });
messages.push({ jsonrpc: '2.0', id: 'finish', method: 'shutdown', params: null }, { jsonrpc: '2.0', method: 'exit' });
-const result = cp.spawnSync(target, [], { input: Buffer.concat(messages.map(frame)), timeout: 20000, maxBuffer: 8 << 20 });
+const result = cp.spawnSync(target, [], { input: Buffer.concat(messages.map(frame)), timeout: 20000 * TIMEOUT_SCALE, maxBuffer: 8 << 20 });
assert.strictEqual(result.status, 0, String(result.stderr));
const responses = [];
let data = result.stdout;