Skip to content

E2E: more robust wait/polling conditions (reduce flakes) #6

Description

@rupertsworld

Summary

End-to-end tests occasionally fail due to timing: the test asserts before GitHub (or the local daemon) has caught up with a prior write. Failures have shown up in first-sync and pull scenarios (e.g. scenarios 9 and 11), but the underlying theme is fragile polling, not a single product bug.

Goal

Strengthen e2e wait conditions in general so tests don’t depend on implicit delays or a single fixed sleep. Prefer:

  • Polling with a clear timeout and actionable failure message
  • Waiting on observable state (file content, remote snapshot, CLI output) rather than time alone
  • Shared helpers so new scenarios don’t reintroduce race-prone patterns

Out of scope (for this issue)

  • Product changes to GitHub fetch semantics unless a test proves a real consistency bug after waits are fixed

Former context

Previously framed as GitHub fetch() read-after-write / ref=main inconsistency. May still exist, but this issue tracks test harness robustness first.

Activity

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions