mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-27 23:25:53 +00:00
Fixes #1620. Cherry pick of #1626 into develop. - Add timeouts for websocket operations for connections to rippled. Without these timeouts if connection hangs for some reason, clio wouldn't know the connection is hanging. - Fix potential data race in choosing new subscription source which will forward messages to users. - Optimise switching between subscription sources.
Unit testing
The correctness of new implementations can be verified via running unit tests. Below are the information on how to run unit tests.
Running
To run the unit tests, first build Clio as normal, then execute ./clio_tests to run all unit tests.
Adding Unit Tests
To add unit tests, please create a separate file for the component you are trying to cover (unless it already exists) and use any other existing unit test file as an example.