tikv / pd

Placement driver for TiKV
Apache License 2.0
1.03k stars 714 forks source link

TestRegionStatistics is unstable #8319

Closed HuSharp closed 6 days ago

HuSharp commented 1 week ago

Flaky Test

Which jobs are failing

--- FAIL: TestRegionStatistics (14.52s)
    cluster_test.go:262: 
            Error Trace:    /home/runner/work/pd/pd/tests/server/cluster/cluster_test.go:262
            Error:          Not equal: 
                            expected: "pd2"
                            actual  : "pd1"

                            Diff:
                            --- Expected
                            +++ Actual
                            @@ -1 +1 @@
                            -pd2
                            +pd1
            Test:           TestRegionStatistics
FAIL

CI link

https://github.com/tikv/pd/actions/runs/9611005214/job/26508694960?pr=7756

Reason for failure (if possible)

Because this test has only 2 pd's and five ResignLeader times, whenever there is a network or disk problem will cause the lease to expire, and result in one more leader resigning. There is a high probability of being recognized as frequent campaign times.

Anything else