diff --git a/test/common/index.js b/test/common/index.js index c70f5b6016870c..9d352a6e24a250 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -143,6 +143,7 @@ const isOpenBSD = process.platform === 'openbsd'; const isLinux = process.platform === 'linux'; const isMacOS = process.platform === 'darwin'; const isASan = process.config.variables.asan === 1; +const isRiscv64 = process.arch === 'riscv64'; const isDebug = process.features.debug; const isPi = (() => { try { @@ -290,6 +291,10 @@ function platformTimeout(ms) { if (isPi) return multipliers.two * ms; // Raspberry Pi devices + if (isRiscv64) { + return multipliers.four * ms; + } + return ms; } diff --git a/test/parallel/test-http-outgoing-end-cork.js b/test/parallel/test-http-outgoing-end-cork.js index 6a217238c447c4..db852bf96df66f 100644 --- a/test/parallel/test-http-outgoing-end-cork.js +++ b/test/parallel/test-http-outgoing-end-cork.js @@ -3,11 +3,11 @@ const common = require('../common'); const assert = require('assert'); const http = require('http'); -const REQ_TIMEOUT = 500; // Set max ms of request time before abort +const REQ_TIMEOUT = common.platformTimeout(500); // Set max ms of request time before abort // Set total allowed test timeout to avoid infinite loop // that will hang test suite -const TOTAL_TEST_TIMEOUT = 1000; +const TOTAL_TEST_TIMEOUT = common.platformTimeout(1000); // Placeholder for sockets handled, to make sure that we // will reach a socket re-use case.