Skip to content

Tests take a long time to run #47146

Description

@targos

There was a time (not so long a go, maybe ~1 year) when make -s jstest took 2-3 minutes on my previous computer.
Now I have a decent Mac with M2 Pro and the same command takes 8 minutes! I don't know what changed, but I doubt we more than doubled the number of tests since then.
Are there some relatively new tests which are specifically slow?

Activity

  1. added
    testIssues and PRs related to Node.js core tests and test infrastructure.
    on Mar 18, 2023
  2. RaisinTen commented on Mar 20, 2023

    @RaisinTen
    Member

    test/parallel/test-single-executable-application.js has been added recently and it's a slow test. On my Intel Mac, it runs for ~38 seconds but I would expect it to be a bit faster on M2 Pro.

  3. bnoordhuis commented on Mar 20, 2023

    @bnoordhuis
    Member

    The test runner unfortunately doesn't have an option to print the running time of individual tests but lowering the timeout (default is 120 seconds) will identify the slow ones:

    $ python tools/test.py -J --timeout 5 parallel
    
  4. richardlau commented on Mar 20, 2023

    @richardlau
    Member

    test-webcrypto takes over a minute to run on my system.

  5. targos commented on Mar 20, 2023

    @targos
    MemberAuthor
    $ python tools/test.py -J --timeout 5
    === release test-http-server-headers-timeout-keepalive ===
    Path: parallel/test-http-server-headers-timeout-keepalive
    Command: out/Release/node /Users/mzasso/git/nodejs/node/test/parallel/test-http-server-headers-timeout-keepalive.js
    --- TIMEOUT ---
    
    
    === release test-http-server-request-timeout-keepalive ===
    Path: parallel/test-http-server-request-timeout-keepalive
    Command: out/Release/node /Users/mzasso/git/nodejs/node/test/parallel/test-http-server-request-timeout-keepalive.js
    --- TIMEOUT ---
    
    
    === release test-single-executable-application ===
    Path: parallel/test-single-executable-application
    Command: out/Release/node /Users/mzasso/git/nodejs/node/test/parallel/test-single-executable-application.js
    --- TIMEOUT ---
    
    
    [04:11|% 100|+ 3721|-   3]: Done
    
    $ time ./node test/parallel/test-http-server-headers-timeout-keepalive.js
    ./node test/parallel/test-http-server-headers-timeout-keepalive.js  0.11s user 0.02s system 0% cpu 15.088 total
    $ time ./node test/parallel/test-http-server-request-timeout-keepalive.js
    ./node test/parallel/test-http-server-request-timeout-keepalive.js  0.11s user 0.02s system 0% cpu 15.090 total
    $ time ./node test/parallel/test-single-executable-application.js
    ./node test/parallel/test-single-executable-application.js  18.78s user 0.53s system 98% cpu 19.641 total
    
    $ make -s jstest
    
    ...
    
    [05:27|% 100|+ 3878|-   0]: Done
    
    All tests passed.
    

    Full run took 5m30s this time. Quite far from the 8 minutes I got last time 🤔

  6. joyeecheung commented on Mar 27, 2023

    @joyeecheung
    Member

    I think #44342 should help this a bit (which should enable us to move these sequential tests to parallel, but I haven't checked locally yet)

  7. joyeecheung commented on Mar 27, 2023

    @joyeecheung
    Member

    I opened #47274 (superseding #44342), which locally cut the time by 19s

  8. added 4 commits that reference this issue on Apr 5, 2023
  9. 28 remaining items

  10. github-actions commented on Jun 15, 2026

    @github-actions
    Contributor

    This issue has been marked as stale due to 210 days of inactivity.
    It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

  11. added
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.testIssues and PRs related to Node.js core tests and test infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions