itest: port custom channel tests from lightning-terminal#2001
itest: port custom channel tests from lightning-terminal#2001darioAnongba wants to merge 8 commits intomainfrom
Conversation
Summary of ChangesHello @darioAnongba, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the integration testing framework for Taproot Assets custom channels. By migrating the test suite from Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request ports a large number of custom channel integration tests from lightning-terminal, which is a significant and valuable effort. The changes also include several improvements to the test harness and RPC server robustness, such as adding retry logic and readiness checks, which will enhance test stability. My review focuses on the newly added test code. I've identified a recurring pattern of using hardcoded 'magic numbers' for balance adjustments in tests, likely to account for rounding errors. While the accompanying comments sometimes mention this, the tests would be more maintainable and less brittle if these adjustments were either explained in more detail or replaced with delta assertions. I've also noted a few misleading comments that should be clarified.
Pull Request Test Coverage Report for Build 22369821846Details
💛 - Coveralls |
bb64829 to
c0cbbb7
Compare
Add infrastructure for running custom channel integration tests in parallel across multiple tranches, matching the pattern used by the standard integration tests.
c0cbbb7 to
3de9a62
Compare
c274bcb to
2c032ac
Compare
Add CI jobs to build and run custom channel integration tests. Currently configured for 1 job x 1 tranche (1 test ported). To scale when more tests are ported, increase NUM_CC_ITEST_JOBS and CC_ITEST_PARALLELISM env vars and expand the matrix.tranche array.
Export OracleHarness and its methods (NewOracleHarness, SetPrice, Start, Stop) so the custom_channels subpackage can use the same mock price oracle server for oracle pricing and decode invoice tests.
Improve the integrated test infrastructure to support the full suite of ported custom channel tests.
314f64c to
35d7c8b
Compare
jtobin
left a comment
There was a problem hiding this comment.
LGTM. 👍 👍 Made a few comments on some stuff that obviously already existed in LiT, but which could stand to be fixed here (mainly the s/erin/fabia thing).
I'm observing some force close flakes when running locally and remember you mentioning you saw some of these as well. I don't think it's a blocker to merge, though. Would be nice to be rid of flakes now, but better to figure them out afterwards if need be.
35d7c8b to
b1b5b63
Compare
889fb5c to
d932ccd
Compare
Port all 22 custom channel test functions from lightning-terminal into the taproot-assets itest/custom_channels subpackage. Each test lives in its own file.
RFQ quote expiry timestamps are expressed as Unix seconds (truncated), while the invoice expiry timestamp was computed with nanosecond precision. This sub-second mismatch caused valid quotes — whose expiry lands on the same second as the invoice expiry — to be rejected with "no quotes with sufficient expiry". Truncate the invoice expiry timestamp to second precision before comparing it against quote expiry times.
d932ccd to
b3cf8f7
Compare
Ports all custom channel test functions and helper functions from
lightning-terminal/itestintotaproot-assets/itest/custom_channels, so custom channel integration tests can run natively intaproot-assetswithout depending onlightning-terminal.core_test.go, grouped_asset_test.go, liquidity_test.go, etc.) alongside the existinglarge_test.gofrom test: custom channel itests #1986.IntegratedNodewithwaitForTapd()andchain-syncpolling infetchNodeInfo()EnsureConnected()with retry logic for startup errorsOracleHarnessfor use by custom channel oracle/decode-invoice testsRun with:
make itest-cc(all) ormake itest-cc cccase=large(single test).