test: Use mocktime in test_seed_peers#21165
Merged
maflcko merged 2 commits intobitcoin:masterfrom Feb 12, 2021
Merged
Conversation
Test case now takes < 5 seconds instead of > 2 minutes
This was referenced Feb 12, 2021
Contributor
Author
|
Request #19884 reviewers @LarryRuane @laanwj @jonatack @MarcoFalke to take a look |
Contributor
|
Code review, tested functional test (replaced "65" seconds mock delay with "55" and verified the test fails as expected), |
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Feb 13, 2021
d4187e4 [test] Use mocktime in test_seed_peers() (Dhruv Mehta) 015637d [refactor] Correct log message in net.cpp (Dhruv Mehta) Pull request description: The test now takes less than 5 seconds instead of more than 2 minutes Further context: https://github.com/bitcoin/bitcoin/pull/19884/files#r575336503 Before: ``` 2021-02-12T17:22:25.980000Z TestFramework (INFO): Test seed peers, this will take about 2 minutes 2021-02-12T17:24:30.472000Z TestFramework (INFO): Test -networkactive option ``` After: ``` 2021-02-12T17:33:39.224000Z TestFramework (INFO): Test seed peers 2021-02-12T17:33:43.139000Z TestFramework (INFO): Test -networkactive option ``` Top commit has no ACKs. Tree-SHA512: 6d8df7d4433c96268694577e4c10a346785e076d45fa220091875e55def200100e7b827fac2a1f7853a2c2c39e9661e06288dca8c645da9e13d4318a4ff2172e
Member
|
Posthumous ACK, thanks! |
Fabcien
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
Jan 27, 2022
Summary: ``` The test now takes less than 5 seconds instead of more than 2 minutes ``` Backport of [[bitcoin/bitcoin#21165 | core#21165]]. Depends on D10908. Test Plan: ./test/functional/test_runner.py feature_config_args Reviewers: #bitcoin_abc, PiRK Reviewed By: #bitcoin_abc, PiRK Differential Revision: https://reviews.bitcoinabc.org/D10909
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test now takes less than 5 seconds instead of more than 2 minutes
Further context: https://github.com/bitcoin/bitcoin/pull/19884/files#r575336503
Before:
After: