Skip to content

Flaky Postgres test: ProjectorTests.ProjectImportedBookingsToTable relies on a fixed 1s delay #599

Closed

Description

@alexeyzimarev

ProjectorTests.ProjectImportedBookingsToTable (src/Postgres/test/Eventuous.Tests.Postgres/Projections/ProjectorTests.cs) produces 100 events, waits a fixed Task.Delay(1000), then reads each projected row. On a slow runner the projection hasn't caught up yet, ReadAsync returns false (unchecked), and reader["checkin_date"] throws:

InvalidOperationException: No resultset is currently being traversed
  at Npgsql.NpgsqlDataReader.ThrowIfNotInResult()
  at Eventuous.Tests.Postgres.Projections.ProjectorTests.ProjectImportedBookingsToTable(...) ProjectorTests.cs:40

This failed the 0.17.0 publish run (https://github.com/Eventuous/eventuous/actions/runs/36728898645, first attempt); a rerun of the same commit passed.

Fix:

  • Replace the fixed delay with polling (with a timeout) until all expected rows exist, or until the subscription checkpoint reaches the last event.
  • Assert that ReadAsync returned true so a missing row fails with a clear message instead of an Npgsql exception.

Activity

  1. linear commented on Sep 30, 2026

    @linear
  2. added 2 commits that reference this issue on Oct 6, 2026
    162aca7
    43dd6f4
  3. added a commit that references this issue on Oct 12, 2026
    60a7643
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpostgresPostgreSQL-specific issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions