Commit Graph

3 Commits

Author SHA1 Message Date
Colin Ihrig
b5740756ca
test_runner: reland run global after() hook earlier
This commit reverts the revert in
bb52656fc6. It also includes the
fix for the issue that required the revert
(https://github.com/nodejs/node/pull/49059#issuecomment-1675171959)
and an additional common.mustCall() in the added test.

Refs: https://github.com/nodejs/node/pull/49059
Refs: https://github.com/nodejs/node/pull/49110
PR-URL: https://github.com/nodejs/node/pull/49116
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-08-14 14:29:29 +00:00
Joyee Cheung
bb52656fc6
Revert "test_runner: run global after() hook earlier"
This reverts commit 6346bdc526.

Reason for revert: breaking CI

PR-URL: https://github.com/nodejs/node/pull/49110
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-08-12 04:19:05 +00:00
cjihrig
6346bdc526
test_runner: run global after() hook earlier
This commit moves the global after() hook execution from the
'beforeExit' event to the point where all tests have finished
running. This gives the global after() a chance to clean up
handles that would otherwise prevent the 'beforeExit' event
from being emitted.

PR-URL: https://github.com/nodejs/node/pull/49059
Fixes: https://github.com/nodejs/node/issues/49056
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-08-11 09:16:51 -04:00