Skip to content

pytest: speed up test_sql significantly.#8886

Merged
rustyrussell merged 1 commit intoElementsProject:masterfrom
rustyrussell:speed-up-sql-test
Feb 6, 2026
Merged

pytest: speed up test_sql significantly.#8886
rustyrussell merged 1 commit intoElementsProject:masterfrom
rustyrussell:speed-up-sql-test

Conversation

@rustyrussell
Copy link
Contributor

@rustyrussell rustyrussell commented Feb 6, 2026

It uses the hold_invoice plugin to ensure that an HTLC is in flight, but it tells it to hold the HTLC for "TIMEOUT * 2" which is a big number under CI.

Reduce it to sqrt(TIMEOUT + 1) * 2, which works for local testing (I run with TIMEOUT=10) and still should be enough for CI (TIMEOUT=180).

Christian reported that the test took 763.00s (!!) under CI.

Changelog-None: tests only

@rustyrussell rustyrussell added this to the v26.04 milestone Feb 6, 2026
It uses the hold_invoice plugin to ensure that an HTLC is in flight, but
it tells it to hold the HTLC for "TIMEOUT * 2" which is a big number under CI.

Reduce it to sqrt(TIMEOUT + 1) * 2, which works for local testing (I run
with TIMEOUT=10) and still should be enough for CI (TIMEOUT=180).

Christian reported that the test took 763.00s (!!) under CI.

On my build machine (TIMEOUT=90):

Before:
	383.00s

After:
	64.38s

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell rustyrussell merged commit 2a5fbd1 into ElementsProject:master Feb 6, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant