Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

many tests are too slow #4932

Closed
Closed

Description

@isaacs

There are a lot of tests that are too slow. Some of them do 1000ms timeouts and stuff, but are perfectly fine to run much faster than that, especially when they should be responding to events rather than waiting on a setTimeout. A full second is way too long for anything in test/simple/, since we run that very frequently.

It'd be great to have most tests run in under 50ms, or perhaps as much as 200ms for cases where timing is actually relevant to the test.

I'd suggest that some tests should just be retired, but every time I think that, some ancient test ends up catching a regression, so they should probably all stay.

Activity

  1. isaacs commented on Mar 6, 2013

    @isaacs
    Author

    These tests all take 1s or longer:

    $ python tools/test.py -t 1 -p tap simple | grep 'not ok'
    not ok 53 - test-cluster-master-kill.js
    not ok 54 - test-cluster-message.js
    not ok 160 - test-fs-watch.js
    not ok 171 - test-http.js
    not ok 172 - test-http-1.0.js
    not ok 173 - test-http-1.0-keep-alive.js
    not ok 213 - test-http-full-response.js
    not ok 214 - test-http-get-pipeline-problem.js
    not ok 216 - test-http-head-response-has-no-body.js
    not ok 227 - test-http-many-keep-alive-connections.js
    not ok 282 - test-https-no-reader.js
    not ok 317 - test-net-keepalive.js
    not ok 354 - test-pipe-file-to-http.js
    not ok 383 - test-regress-GH-1697.js
    not ok 439 - test-stream-pipe-multi.js
    not ok 441 - test-stream2-basic.js
    not ok 460 - test-stream2-writable.js
    

    Those would be a good place to start.

  2. matthewpalmer commented on Jul 21, 2013

    @matthewpalmer

    How do I run a test for a single file individually? Eg. I want to just run the tests in test-fs-watch.js, not all the tests with make test.
    Thanks - sorry if this is a silly question.

  3. bnoordhuis commented on Jul 22, 2013

    @bnoordhuis
    Member

    You can run either out/Release/node test/simple/test-fs-watch.js or python tools/test.py simple/test-fs-watch (the latter also accepts wildcards, e.g. simple/test-fs-* runs all the fs tests.)

  4. matthewpalmer commented on Jul 23, 2013

    @matthewpalmer

    Awesome. Thank you :)

  5. frankcash commented on Dec 24, 2014

    @frankcash

    Is this still a wanted change? I'd be willing to work on this

  6. bnoordhuis commented on Dec 24, 2014

    @bnoordhuis
    Member

    I think this can be closed. Slow tests have been moved to test/pummel and io.js goes a step further by running most tests in parallel as of nodejs/node#172.

  7. jasnell commented on May 20, 2015

    @jasnell
    Member

    Marking this as a potential iojs-backport, but closing. Can reopen if we feel this is still something worth pursuing in this stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions