Speed up slow tests#2019
Merged
thomas-zahner merged 10 commits intolycheeverse:masterfrom Feb 9, 2026
Merged
Conversation
6646340 to
521a8e0
Compare
thomas-zahner
commented
Feb 2, 2026
katrinafyi
reviewed
Feb 8, 2026
Member
katrinafyi
left a comment
There was a problem hiding this comment.
looks good. it's a very good idea to disentangle the cache tests.
Remove dependency on previously deleted TEST_INVALID_URLS.html
The test is now running locally without requiring an internet connection
The previous assertion conincidentially matched the timestamp 1769996167
8fc4097 to
54d7e3b
Compare
The test was previously lying and confusing. Unknown status codes such as 999 are actually cached today. linkedin returned 200 given lychee's user agent.
Co-authored-by: katrinafyi <39479354+katrinafyi@users.noreply.github.com>
54d7e3b to
c5f7348
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1892.
In CI we can see that tests now take about 55 seconds instead of 70 seconds. The CI action spends a lot of time in compiling lychee. This change is mainly an improvement for local development. E.g. on my machine the first stage of
make test(cargo nextest run --all-targets --all-features) now takes about 5 seconds instead of 12 on average.Apart from speeding up the tests I could also improve the reliability.
Some background details
test_lycheecache_exclude_custom_status_codesrequires no internet but was slow because of unnecessary retries.test_require_httpsis using example.com. As it seems really unpractical to make localhost functional with HTTPS and it generally isn't slow I would prefer to keep this test unchanged.Fix the flakiness of the cache tests. They were racing against each other writing and deleting the cache files of each other.