Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: make test timeouts configurable #1238

Merged
merged 3 commits into from Nov 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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