Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement a VirtualClock to make tests more efficient and reliable #389
We already use something similar for our BanManager tests, where we override the BanManager's clock routine to return a "fake" clock time. Stellar-core does something similar for its entire test-suite, and especially for the SCP tests. With a virtual clock we can make tests more efficient, and we can simulate arbitrary delays without having to physically wait for the wall clock time to advance.
In short: yes, for testing failures. We don't have those tests yet in Agora, but I plan to add them.
Here's some info for the whole team:
So timer's in SCP are only used to track communication failures within a given time-frame. SCP basically does this (pseudocode):