Commit Graph

4 Commits

Author SHA1 Message Date
Ben Davies
8de4bdfecb Sockets: refactor to use maps (#3474) 2017-04-23 16:39:38 -07:00
Ben Davies
5031794f97 Sockets: fix unit tests (#3281)
* Sockets: fix Sockets.killWorker not disconnecting connections

* Sockets: fix unit tests

- Fix crash when constructing mock sockets in certain cases
- Properly prevent workers from writing to stdout
- Fix race conditions in workers-related tests that were causing false
  positives

* Tests: mock workers now more closely imitate sockets' workers

This helps catch cases where messages are being sent in the wrong order
to the workers, e.g. messages sent to sockets that no longer exist.
2017-02-24 05:38:37 -06:00
Ben Davies
8a9ce4a12a Sockets: temporarily skip unit tests (#3235)
Until the crashes and workers' flooding of stdout are resolved.
2017-02-14 22:00:06 -06:00
Ben Davies
2d0e7dba25 Implement sockets.js unit tests (#3098)
These tests are just sanity checks for sockets.js' exported methods.
Tests for bugs will come later when those for related users.js methods
have been written.
2017-01-16 16:38:16 -06:00