[ 
https://issues.apache.org/jira/browse/RATIS-2777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tsz-wo Sze resolved RATIS-2777.
-------------------------------
    Fix Version/s: 3.4.0
       Resolution: Fixed

The pull request is now merged.  Thanks, [~slfan1989]!

> Fix flaky leader lease tests
> ----------------------------
>
>                 Key: RATIS-2777
>                 URL: https://issues.apache.org/jira/browse/RATIS-2777
>             Project: Ratis
>          Issue Type: Test
>          Components: test
>            Reporter: Shilun Fan
>            Assignee: Shilun Fan
>            Priority: Major
>             Fix For: 3.4.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> LeaderElectionTests.testLeaderLease intermittently fails in CI.
> The related testLeaderLeaseDuringReconfiguration uses similar timing 
> assumptions and may also be flaky.
> Failed CI job:
> https://github.com/apache/ratis/actions/runs/39883138118/job/120184983184
> The tests check lease validity immediately after a write completes.
> However, a successful write does not guarantee that the lease is still valid 
> when the assertion runs.
> With a lease duration of only 75ms, network or scheduling delays in CI may 
> cause it to expire before the check.
> The tests also use a fixed sleep before checking lease expiry.
> Additionally, assertLeaderLease reverses the expected and actual arguments, 
> making failure messages misleading.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to