Skip to content

pytest: speed up test_sql significantly.#8886

Open
rustyrussell wants to merge 1 commit intoElementsProject:masterfrom
rustyrussell:speed-up-sql-test
Open

pytest: speed up test_sql significantly.#8886
rustyrussell wants to merge 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>
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