fix: Fix all hanging tests, reduce flakyness of other tests
Fix all hanging tests. Includes a protobuf change.
-
Bugfix: change gracefulDiconnect into notification (it was previously partly treated as a notification)
-
Bugfix: do not open new connections when ConnectionManager is in Stopping state
-
Make timeouts unique by single milliseconds to make it easier to recognize in debug tools which timeout is which
-
Force SimulatorConnection to send 'disconnect' event in close() the same way as websocket connections
-
Add constructor option 'stopGivenTransport' DhtNode to indicate that the given transport should not be stopped when the DhtNode is stopped.
-
Use the 'stopGivenTransport' in trackerless tests (the transports were not previously stopped at all)
-
Call stop() on simulator in tests if it was started
-
remove --force-exit from test scripts
-
remove memory leaks from client by adding handling of destroy signal to many places and by removing closures
-
fix mqtt bridge test to properly wait for arriving messages
-
fix websocket connection establishment in broker websocket plugin test (previously 'error' waitForEvent would time out and cause unhandled promise exception on slower machines)
-
await for sub1.unsubscribe() in memory leak test to get the subscription to non-random state before testing for memory leaks
There are many great improvements 👍 Would it make sense to divide this quite big PR so that some of the improvement are in separate PRs? (E.g. the bug fixes in one PR, test teardown fixes in one etc.)
That way it would be easy to review and manage the changes and we'd get these merged sooner. (We can't maybe land a PR with 100 changed files e.g. just a day before the release). Also we'll have less git conflicts when we can land some of these changes sooner.