szmarczak / cacheable-lookup

A cacheable dns.lookup(…) that respects TTL :tada:
MIT License
190 stars 29 forks source link

Jest reporting CachableLookup is preventing shutdown #58

Closed drewish closed 2 years ago

drewish commented 2 years ago

Seems like https://github.com/szmarczak/cacheable-lookup/issues/19 might still be occurring:

Jest has detected the following 1 open handle potentially keeping Jest from exiting:

  ●  DNSCHANNEL

      at new CacheableLookup (../node_modules/cacheable-lookup/source/index.js:91:14)
      at new Request (../node_modules/amply.js/lib/request.js:64:21)
      at new Client (../node_modules/amply.js/lib/client.js:9:20)
      at Object.<anonymous> (../node_modules/amply.js/index.js:4:18)

I'm not sure if the bug is on the ampliy.js side though.

drewish commented 2 years ago

Maybe the solution is to just upgrade Jest? https://github.com/facebook/jest/pull/11470 Seems like they no longer think this is a problem.

szmarczak commented 2 years ago

Jest doesn't work correctly when it comes to detecting open handles. It also reports unreffed servers.

szmarczak commented 2 years ago

The proper solution would be to drop Jest and use something else