Skip to content

the_json_listing_migrates_the_cache_and_the_table_does_not flakes on a full-suite run #526

Description

@blooop

Found by the fresh-context review of #514, which correctly identified it as pre-existing and unrelated to that diff. Filing it so it is not carried in a PR thread.

rust/dl/tests/read_side.rs:748 the_json_listing_migrates_the_cache_and_the_table_does_not fails roughly one full-suite run in five and passes in isolation.

The mechanism the reviewer traced: --ls is in CACHE_READING_COMMANDS (flows/completion_cache.rs:209), so it spawns a background dl --update-cache. That child calls open_records, open_records runs the cache migration, and the migration races the assertion that the document is still at version 1. The test is asserting that the table path does not migrate, and a detached child of its own making does.

So the flake is not timing noise around an unrelated write. It is the test racing a process the command under test started, which means the fix is about what the test does with that child rather than about widening a tolerance.

Worth doing alongside #416, which carries the residual aid pty flakes: same class of problem, and the same question of whether a test that spawns a real child should be waiting on it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions