code-server-2/test
Anmol Sethi c32d8b155f
heart.ts: Fix leak when server closes
This had me very confused for quite a while until I did a binary search
inspection on route/index.ts. Only with the heart.beat line commented
out did my tests pass without leaking.

They weren't leaking fds but just this heartbeat timer and node of
course prints just fds that are active when it detects some sort of leak
I guess and that made the whole thing very confusing. These fds are not
leaked and will close when node's event loop detects there are no more
callbacks to run.

no of handles 3

tcp stream {
  fd: 20,
  readable: false,
  writable: true,
  address: {},
  serverAddr: null
}

tcp stream {
  fd: 22,
  readable: false,
  writable: true,
  address: {},
  serverAddr: null
}

tcp stream {
  fd: 23,
  readable: true,
  writable: false,
  address: {},
  serverAddr: null
}

It kept printing the above text again and again for 60s and then the
test binary times out I think. I'm not sure if it was node printing the
stuff above or if it was a mocha thing. But it was really confusing...

cc @code-asher for thoughts on what was going on.

edit: It was the leaked-handles import in socket.test.ts!!!
Not sure if we should keep it, this was really confusing and misleading.
2021-01-20 02:06:44 -05:00
..
test-plugin v3.7.0 2020-11-16 11:11:50 -05:00
cli.test.ts cli: hashedPassword -> hashed-password (#2454) 2020-12-18 12:20:38 -05:00
httpserver.ts Formatting and linting fixes 2021-01-20 02:06:44 -05:00
integration.ts heart.ts: Fix leak when server closes 2021-01-20 02:06:44 -05:00
plugin.test.ts test: Rename testutil.ts to httpserver.ts 2021-01-20 02:06:44 -05:00
proxy.test.ts Formatting and linting fixes 2021-01-20 02:06:44 -05:00
socket.test.ts src/node/cli.ts: Add --cert-host to configure generated certificate hostname 2020-10-30 13:36:53 -04:00
tsconfig.json Make updating work for both binary and loose releases 2020-02-20 18:48:16 -06:00
update.test.ts Convert routes to Express 2020-10-26 17:56:13 -05:00
util.test.ts Remove unused deep merge code 2020-08-13 17:11:34 -05:00