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

Configurable timeout? #5

Open
thom-nic opened this issue Dec 15, 2021 · 0 comments
Open

Configurable timeout? #5

thom-nic opened this issue Dec 15, 2021 · 0 comments

Comments

@thom-nic
Copy link

I'm trying to upgrade node-bcrypt which still uses nodeunit style tests. The repetitions test fails due to timeout.

You can test this by:

git clone git@github.com:kelektiv/node.bcrypt.js.git
cd node.bcrypt.js
npm i
npx nodeunit-tape-compat test/repetitions.js

Note however this is platform dependent, depending on your machine you may beat the timeout. This is what I see on a linux Celeron box:

...
   ✓ equal(No match.)
   ✓ equal(No match.)
   ✓ equal(No match.)
✘ Some tests failed.
Error: Test timeouted or exited without ending
    at /Users/thom/.npm/_npx/30520/lib/node_modules/nodeunit-tape-compat/node_modules/scramjet-core/lib/util/promise-transform-stream.js:230:31
  caused by:
    at Timeout._onTimeout (/Users/thom/.npm/_npx/30520/lib/node_modules/nodeunit-tape-compat/index.js:87:29)

however it passes if I run npx nodeunit test/repetitions.js:

$ npx nodeunit test/repetitions.js            

repetitions.js
✔ test_salt_length
✔ test_hash_length
✔ test_compare
✔ test_hash_and_compare

OK: 14997 assertions (9621ms)

note the run time is right near the 10 second hard-coded timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant