Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upIBD improvements #1013
Conversation
DavidVorick
reviewed
Mar 10, 2016
| go func() { | ||
| // Sync with the network. Don't sync if we are testing because typically we | ||
| // don't have any mock peers to synchronize with in testing. | ||
| // TODO: figure out a better way to conditionally do IBD. Otherwise this block will never be tested. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
DavidVorick
Mar 10, 2016
Member
one thing you could do is pass a flag in, but that could get pretty annoying.
DavidVorick
Mar 10, 2016
Member
one thing you could do is pass a flag in, but that could get pretty annoying.
VoidingWarranties
added some commits
Feb 27, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
VoidingWarranties
Mar 11, 2016
Collaborator
How long is too long for a long test? TestInitialBlockchainDownloadDoneRules takes 44 seconds.
|
How long is too long for a long test? TestInitialBlockchainDownloadDoneRules takes 44 seconds. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
DavidVorick
Mar 11, 2016
Member
44 seconds is fine, keep the whole thing under 5 minutes if possible. But even 10 minutes isn't too bad.
|
44 seconds is fine, keep the whole thing under 5 minutes if possible. But even 10 minutes isn't too bad. |
VoidingWarranties
added some commits
Mar 10, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
VoidingWarranties
Mar 11, 2016
Collaborator
TestInitialBlockchainDownloadDoneRules only takes so long because minIBDWaitTime is 10 seconds during testing. It needs to be 10 seconds so that large reorg tests have enough time to complete. However, this specific test doesn't involve any block transfers so we could manually set minIBDWaitTime to 1s for just this test. That would shorten this test to just 5 seconds.
|
TestInitialBlockchainDownloadDoneRules only takes so long because |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
DavidVorick
Mar 11, 2016
Member
No need to worry about it. Since we use t.Parallel() (or at least, we're migrating to using it) there shouldn't be any issues with long sleeps. As long as the whole suite (per package) is finishing inside of 5 minutes, there's nothing to worry about.
|
No need to worry about it. Since we use |
VoidingWarranties commentedMar 10, 2016
Not complete. Still needs manual timeouts (muxado doesn't timeout correctly nor does it return proper
net.Errorerrors) and tests.