Skip to content

Commit

Permalink
test: make test timeouts configurable (#1238)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
mhdawson and mcollina committed Nov 24, 2021
1 parent fbe9766 commit 03dac4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/helper.js
Expand Up @@ -54,7 +54,7 @@ function sleep (ms) {

function watchFileCreated (filename) {
return new Promise((resolve, reject) => {
const TIMEOUT = 2000
const TIMEOUT = process.env.PINO_TEST_WAIT_WATCHFILE_TIMEOUT || 10000
const INTERVAL = 100
const threshold = TIMEOUT / INTERVAL
let counter = 0
Expand All @@ -79,7 +79,7 @@ function watchFileCreated (filename) {

function watchForWrite (filename, testString) {
return new Promise((resolve, reject) => {
const TIMEOUT = 2000
const TIMEOUT = process.env.PINO_TEST_WAIT_WRITE_TIMEOUT || 10000
const INTERVAL = 100
const threshold = TIMEOUT / INTERVAL
let counter = 0
Expand Down

0 comments on commit 03dac4d

Please sign in to comment.