Skip to content

Fix flaky numbered-header and bookmark end-to-end tests - #550

Open
splitbrain wants to merge 1 commit into
masterfrom
fix-flaky-tests
Open

Fix flaky numbered-header and bookmark end-to-end tests#550
splitbrain wants to merge 1 commit into
masterfrom
fix-flaky-tests

Conversation

@splitbrain

Copy link
Copy Markdown
Owner

The renderer is a singleton whose cross-page chapter counter and bookmark-level state advance in document_start(). A per-page render cache hit skips document_start(), so the numbering desyncs depending on which pages were served from cache and which were rendered fresh. Between tests this made numbered headers and bookmark levels depend on execution order and file mtimes, so the tests failed intermittently.

Disable the render cache in the tests so every fixture page renders fresh.

The renderer is a singleton whose cross-page chapter counter and
bookmark-level state advance in document_start(). A per-page render
cache hit skips document_start(), so the numbering desyncs depending on
which pages were served from cache and which were rendered fresh.
Between tests this made numbered headers and bookmark levels depend on
execution order and file mtimes, so the tests failed intermittently.

Disable the render cache in the tests so every fixture page renders
fresh.
@Klap-in

Klap-in commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

why does it only affect the cache?

@splitbrain

Copy link
Copy Markdown
Owner Author

not sure if that is what you meant, but looking at it again I think there's a deeper issue here than just failing tests.

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.

2 participants