test: improve test-async-hooks-http-parser-destroy
requested to merge github/fork/dynatrace-oss-contrib/test-async-hooks-http-parser-destroy into master
Improve asserts to distinguish between reequest and response parsers.
Change the assert sequence to first assert on the number of ids to easier identify if some operation is missing/incomplete.
Destroy HTTP agent once expected number of events have been seen to avoid waiting on socket timeouts.
Refs: https://github.com/nodejs/node/issues/28112
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines