Skip to content

TestAffinityListWithIDs is flaky #10565

@okJiang

Description

@okJiang

Flaky Test

Which jobs are failing

=== NAME  TestAffinityHandlerTestSuite/TestAffinityListWithIDs
affinity_test.go:861:
Error Trace:	/home/runner/work/pd/pd/tests/server/apiv2/handlers/affinity_test.go:861
/home/runner/work/pd/pd/tests/testutil.go:607
/home/runner/work/pd/pd/tests/testutil.go:426
/home/runner/work/pd/pd/tests/testutil.go:398
/home/runner/work/pd/pd/tests/server/apiv2/handlers/affinity_test.go:844
Error:     	"map[group-1:{\"id\":\"group-1\",\"create_timestamp\":1775124208}]" should have 2 item(s), but has 1
Test:      	TestAffinityHandlerTestSuite/TestAffinityListWithIDs

CI link

https://prow.tidb.net/view/gs/prow-tidb-logs/pr-logs/pull/tikv_pd/10523/pull-unit-test-next-gen-2/2039533211645644800
https://prow.tidb.net/view/gs/prow-tidb-logs/pr-logs/pull/tikv_pd/10548/pull-unit-test-next-gen-2/2039533727440179200
https://github.com/tikv/pd/actions/runs/23895037581/job/69677541118

Reason for failure (if possible)

The list endpoint returned fewer affinity groups than expected. This run shows the assertion failing because the result only contained one group instead of two.

Anything else

test=TestAffinityHandlerTestSuite/TestAffinityListWithIDs signatures=ASSERTION_FAILURE

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/ciThe issue is related to CI.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions