From 8e3c5b59bf1d4889146241e7d6197425842fd813 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 10 Nov 2018 16:05:01 -0800 Subject: [PATCH] test: fix flaky test-vm-timeout-escape-queuemicrotask Use a larger timeout on slower platforms so that the timeout doesn't fire before the error condition occurs. PR-URL: https://github.com/nodejs/node/pull/24296 Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater Reviewed-By: Franziska Hinkelmann --- test/known_issues/known_issues.status | 1 - test/known_issues/test-vm-timeout-escape-queuemicrotask.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/known_issues/known_issues.status b/test/known_issues/known_issues.status index 2a5514920b27bb..a1f66fc6d96fc2 100644 --- a/test/known_issues/known_issues.status +++ b/test/known_issues/known_issues.status @@ -10,7 +10,6 @@ prefix known_issues [$system==linux] test-vm-timeout-escape-promise: PASS,FLAKY -test-vm-timeout-escape-queuemicrotask: PASS,FLAKY [$system==macos] diff --git a/test/known_issues/test-vm-timeout-escape-queuemicrotask.js b/test/known_issues/test-vm-timeout-escape-queuemicrotask.js index 8de33bc24ddcdc..1ed327f7793e7c 100644 --- a/test/known_issues/test-vm-timeout-escape-queuemicrotask.js +++ b/test/known_issues/test-vm-timeout-escape-queuemicrotask.js @@ -4,7 +4,7 @@ // Promises, nextTick, and queueMicrotask allow code to escape the timeout // set for runInContext, runInNewContext, and runInThisContext -require('../common'); +const common = require('../common'); const assert = require('assert'); const vm = require('vm'); @@ -32,7 +32,7 @@ assert.throws(() => { queueMicrotask, loop }, - { timeout: 5 } + { timeout: common.platformTimeout(5) } ); }, { code: 'ERR_SCRIPT_EXECUTION_TIMEOUT',