Skip to content

Commit 03dac4d

Browse files
mhdawsonmcollina
andauthoredNov 24, 2021
test: make test timeouts configurable (#1238)
* test: make test timeouts configurable Signed-off-by: Michael Dawson <mdawson@devrus.com> * Update test/helper.js Co-authored-by: Matteo Collina <matteo.collina@gmail.com> * Update test/helper.js Co-authored-by: Matteo Collina <matteo.collina@gmail.com> Co-authored-by: Matteo Collina <matteo.collina@gmail.com>
1 parent fbe9766 commit 03dac4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎test/helper.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function sleep (ms) {
5454

5555
function watchFileCreated (filename) {
5656
return new Promise((resolve, reject) => {
57-
const TIMEOUT = 2000
57+
const TIMEOUT = process.env.PINO_TEST_WAIT_WATCHFILE_TIMEOUT || 10000
5858
const INTERVAL = 100
5959
const threshold = TIMEOUT / INTERVAL
6060
let counter = 0
@@ -79,7 +79,7 @@ function watchFileCreated (filename) {
7979

8080
function watchForWrite (filename, testString) {
8181
return new Promise((resolve, reject) => {
82-
const TIMEOUT = 2000
82+
const TIMEOUT = process.env.PINO_TEST_WAIT_WRITE_TIMEOUT || 10000
8383
const INTERVAL = 100
8484
const threshold = TIMEOUT / INTERVAL
8585
let counter = 0

0 commit comments

Comments
 (0)
Please sign in to comment.