-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Match unit tests on start of test name, and split some test classes #4634
Conversation
* For example, without this change, to run the TxQ tests, must specify `--unittest=TxQ1,TxQ2` on the command line. With this change, can use `--unittest=TxQ`, and both will be run. * An exact match will prevent any further partial matching. * This could have some side effects for different tests with a common name beginning. For example, NFToken, NFTokenBurn, NFTokenDir. This might be useful. If not, the shorter-named test(s) can be renamed. For example, NFToken to NFTokenBase.
* Potentially speeds up parallel tests by a factor of 5
* upstream/develop: Set version to 1.12.0-rc1 Set version to 1.12-b3 Several changes to improve Consensus stability: (4505) Apply transaction batches in periodic intervals (4504) Asynchronously write batches to NuDB (4503) refactor: fix typo in FeeUnits.h (4644) Update Ubuntu build image (4650) test: add forAllApiVersions helper function (4611) add view updates for account SLEs (4629) Fix the package recipe for consumers of libxrpl (4631) refactor: improve checking of path lengths (4519) refactor: use C++20 function std::popcount (4389) fix(AMM): prevent orphaned objects, inconsistent ledger state: (4626) feat: support Concise Transaction Identifier (CTID) (XLS-37) (4418)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
* upstream/develop: Set version to 1.12.0-rc3 Revert "Asynchronously write batches to NuDB (4503)" Revert "Apply transaction batches in periodic intervals (4504)" Revert "Several changes to improve Consensus stability: (4505)"
I guess @ximinez , at your convenience, feel free to bring this up-to-date with |
* upstream/develop: docs: update SECURITY.md (4338) refactor: simplify `TxFormats` common fields logic (4637) APIv2(ledger_entry): return invalidParams for bad parameters (4630) docs(rippled-example.cfg): clarify ssl_cert vs ssl_chain (4667) Introduce replacement for getting and setting thread name: (4312) Set version to 1.12.0 Set version to 1.12.0-rc4 amm_info: fetch by amm account id; add AMM object entry (4682) AMMBid: use tecINTERNAL for 'impossible' errors (4674)
Turns out I did. Totally forgot about that. I turned it off.
Merge is done. Assuming this gets squashed down to one commit, I think the following would be a fine commit message:
|
* upstream/develop: Several changes to improve Consensus stability: (4505) Apply transaction batches in periodic intervals (4504) Asynchronously write batches to NuDB. (4503) Remove CurrentThreadName.h from RippledCore.cmake (4697)
@manojsdoshi - are we ok to merge this to |
* For example, without this change, to run the TxQ tests, must specify `--unittest=TxQ1,TxQ2` on the command line. With this change, can use `--unittest=TxQ`, and both will be run. * An exact match will prevent any further partial matching. * This could have some side effects for different tests with a common name beginning. For example, NFToken, NFTokenBurn, NFTokenDir. This might be useful. If not, the shorter-named test(s) can be renamed. For example, NFToken to NFTokens. * Split the NFToken, NFTokenBurn, and Offer test classes. Potentially speeds up parallel tests by a factor of 5.
* For example, without this change, to run the TxQ tests, must specify `--unittest=TxQ1,TxQ2` on the command line. With this change, can use `--unittest=TxQ`, and both will be run. * An exact match will prevent any further partial matching. * This could have some side effects for different tests with a common name beginning. For example, NFToken, NFTokenBurn, NFTokenDir. This might be useful. If not, the shorter-named test(s) can be renamed. For example, NFToken to NFTokens. * Split the NFToken, NFTokenBurn, and Offer test classes. Potentially speeds up parallel tests by a factor of 5.
* For example, without this change, to run the TxQ tests, must specify `--unittest=TxQ1,TxQ2` on the command line. With this change, can use `--unittest=TxQ`, and both will be run. * An exact match will prevent any further partial matching. * This could have some side effects for different tests with a common name beginning. For example, NFToken, NFTokenBurn, NFTokenDir. This might be useful. If not, the shorter-named test(s) can be renamed. For example, NFToken to NFTokens. * Split the NFToken, NFTokenBurn, and Offer test classes. Potentially speeds up parallel tests by a factor of 5.
…LF#4846) Update the "rippled --help" message for the "-u" parameter. This documents the unit test name pattern matching rule implemented by XRPLF#4634. Fix XRPLF#4800
High Level Overview of Change
Changes the matching of the parameters to the
--unittest
command line option to match the patterns against the beginning of the test name.--unittest=TxQ1,TxQ2
on the command line. With this change, one can use--unittest=TxQ
, and both will be run.NFToken
,NFTokenBurn
,NFTokenDir
. This might be useful. If not, the shorter-named test(s) can be renamed. For example,NFToken
toNFTokenBase
.Speaking of
NFToken
, the second commit splits it, along with theNFTokenBurn
, andOffer
test classes into 4 or 5 sub-classes each, based on the differentFeatureBitset
s that are currently run sequentially. In Windows, this speeds up a Debug build unit test run by about 5x! (Details below.)There are two commits. The don't necessarily need to be squashed when merging, though it would be fine if they are.
Context of Change
Long test run times have been a thorn in all of our sides for a while, but are even worse in Windows Debug builds, because there is a ton of overhead. At the recent team summit, someone threw out the idea of adding regex parsing to the matching. This doesn't do full regex matching, but that keeps it pretty simple.
Note that these changes only affect unit tests.
Type of Change
Before / After
Before:
These examples are with the tip of develop, commit aded4a7 as of this writing
--unittest=TxQ
(fails)--unittest=TxQ1, TxQ2
(works)Full test run with multiple runners
--unittest --unittest-jobs=16
(2228.9 seconds, bound by the longest running test)After:
--unittest=TxQ
(succeeds!)--unittest=TxQ1, TxQ2
(results unchanged)Full test run with multiple runners
--unittest --unittest-jobs=16
(438.7 seconds, not bound by the longest running test)The fact that the overall test run takes longer than the longest suite (
TheoreticalQuality
in this case) means that that longest running test suite finished before all the other tests were finished, which allowed the child to be reused to run more tests. I haven't seen that happen in on a full run in any configuration in years.Test Plan
Because only unit test code has changed, as long as exiting tests pass as they normally do, there's no additional functional testing needed.
Future Tasks
Full regex parsing?