Skip to content

gc tests don't run properly  #5442

@mhdawson

Description

@mhdawson

This commit(#5376) seems to have broken the gc tests as they seem to run missing --expose-gc

to run

out/Release/node deps/npm/node_modules/node-gyp/bin/node-gyp rebuild --directory="$WORKSPACE/node/test/gc/node_modules/weak" --nodedir="$WORKSPACE/node"
tools/test.py --mode=release --progress=tap gc | tee gc.tests.tap

If I revert that change(with git checkout 1170b26 tools/test.py) the tests pass, otherwise I get errors like:

not ok 5 test-net-timeout.js
# /home/mhdawson/pulls/land/fips2/node/test/gc/test-net-timeout.js:46
#       gc();
#       ^
#
# ReferenceError: gc is not defined
#     at Socket. (/home/mhdawson/pulls/land/fips2/node/test/gc/test-net-timeout.js:46:7)
#     at Socket.g (events.js:277:16)
#     at emitNone (events.js:81:13)
#     at Socket.emit (events.js:180:7)
#     at Socket._onTimeout (net.js:324:8)
#     at _runOnTimeout (timers.js:537:11)
#     at _makeTimerTimeout (timers.js:528:3)
#     at Timer.unrefTimeout (timers.js:597:5)
# We should do 500 requests
  ---
  duration_ms: 0.234

Don't believe the gc tests are run in the CI and that's why we did not see in the CI runs. I noticed they started failing in our internal jobs and that's how I noticed it.

@stefanmb can you please take a look

Metadata

Metadata

Assignees

No one assigned

    Labels

    testIssues and PRs related to the tests.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions