Skip to content

Make the RavenDB index wait in the persistence tests tolerant of slow CI runners - #5951

Merged
ramonsmits merged 1 commit into
masterfrom
ramon/raven-index-awaiter
Oct 5, 2026
Merged

ramonsmits merged 1 commit into
masterfrom
ramon/raven-index-awaiter

Conversation

@ramonsmits

Copy link
Copy Markdown
Member

The persistence tests wait for all RavenDB indexes to be up to date after they write data. The wait gave up after 10 seconds. On a slow Windows runner a fresh database with three new indexes needs more time. This made AuditCountingTests.Should_return_zero_throughput_entry_when_SendOnly fail in #5949 with no detail about the cause.

Changes to RavenIndexAwaiter in both RavenDB persistence test projects:

  • Wait up to 60 seconds. Poll every 100 ms instead of a hot spin on a synchronous statistics request.
  • Fail at once when an index is in the error state. Include the index errors in the message.
  • Name the stale indexes and their state when the wait times out.
  • Make the helper async and await it at the call sites.

The wait returns as soon as the indexes are up to date. The larger budget only adds time when something is wrong.

…ow CI runners

The helper waited at most 10 seconds for all indexes to be up to date. A fresh
database with three new indexes needed more than that on a Windows runner, which
made AuditCountingTests.Should_return_zero_throughput_entry_when_SendOnly fail
without any detail about which index was still stale.

- Wait up to 60 seconds and poll every 100 ms instead of spinning on a
  synchronous statistics request
- Fail at once when an index is in the error state and include the index errors
- Name the stale indexes and their state when the wait times out
- Make the helper async and await it at the call sites
@ramonsmits
ramonsmits merged commit 18ef4c5 into master Oct 5, 2026
36 checks passed
@ramonsmits
ramonsmits deleted the ramon/raven-index-awaiter branch October 5, 2026 15:00

@danielmarbach danielmarbach left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

3 participants