-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement a VirtualClock to make tests more efficient and reliable #389
Comments
Is this becoming more of a priority now that we have SCPD ? |
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):
Where |
We did not account for the fact that our unittests are built with code coverage support. For each line in the D code, the compiler injects an increment opcode do a compiler-built bit array. This can significantly slow down processing, so as a counter-measure we can increase the timeouts to make the test-suite less brittle. The ultimate solution would be to replace the use of real time with virtual time. See bosagora#389.
We did not account for the fact that our unittests are built with code coverage support. For each line in the D code, the compiler injects an increment opcode do a compiler-built bit array. This can significantly slow down processing, so as a counter-measure we can increase the timeouts to make the test-suite less brittle. The ultimate solution would be to replace the use of real time with virtual time. See bosagora#389.
We did not account for the fact that our unittests are built with code coverage support. For each line in the D code, the compiler injects an increment opcode do a compiler-built bit array. This can significantly slow down processing, so as a counter-measure we can increase the timeouts to make the test-suite less brittle. The ultimate solution would be to replace the use of real time with virtual time. See bosagora#389.
We did not account for the fact that our unittests are built with code coverage support. For each line in the D code, the compiler injects an increment opcode do a compiler-built bit array. This can significantly slow down processing, so as a counter-measure we can increase the timeouts to make the test-suite less brittle. The ultimate solution would be to replace the use of real time with virtual time. See #389.
Resolved. |
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.
The text was updated successfully, but these errors were encountered: