Skip to content

[Bug]: Race UT TestLoopWork assumes all entries are consumed within 400ms #28778

Description

@XuPeng-SH

Existing issue check

Searched open and closed issues for TestLoopWork/valid_entries and did not find a matching issue.

Observed behavior

In PR #28740 UT run 34681517114, pkg/datasync.TestLoopWork/valid_entries failed at consumer_test.go:935 and :938:

  • expected syncedLsn 30, got 13;
  • expected required LSN 31, got 0.

The test writes 30 records, starts c.loop, raises the watermark after a fixed 200 ms, then cancels after another 200 ms. The race UT runner only processed 13 records before cancellation, so the assertions depend on all asynchronous work completing within a fixed 400 ms window. This is evidence of a scheduler-sensitive test assumption; only one failing run is currently confirmed, so same-head fail/pass evidence is still needed before classifying it as intermittent.

Expected behavior and investigation

Keep the coverage that the consumer handles all valid entries and advances the required LSN, but synchronize the test on observable progress or a bounded completion condition instead of assuming the worker processes 30 entries within 400 ms. Do not relax the expected record count or disable race coverage.

This test failure is unrelated to PR #28740's code changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions