Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TestMemberAdd's context timeout by adding 5 more seconds #19032

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

ahrtr
Copy link
Member

@ahrtr ahrtr commented Dec 9, 2024

The test case will wait 5 seconds if waitForQuorum is true

if quorumTc.waitForQuorum {
time.Sleep(etcdserver.HealthInterval)
}

The context timeout is 10 seconds in total, but sometimes it may take a long time for the cluster to be ready, and the remaining time to run the test may < 5 seconds. In that case, the test will timeout for sure.

execute.go:47: ---> Test failed: test timed out after 4.252903074s, err: context deadline exceeded

Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.79%. Comparing base (801dfc3) to head (99be181).
Report is 2 commits behind head on main.

Additional details and impacted files

see 19 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #19032      +/-   ##
==========================================
+ Coverage   68.77%   68.79%   +0.02%     
==========================================
  Files         420      420              
  Lines       35623    35623              
==========================================
+ Hits        24498    24506       +8     
+ Misses       9699     9692       -7     
+ Partials     1426     1425       -1     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 801dfc3...99be181. Read the comment docs.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, serathius

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@serathius
Copy link
Member

Please note that TestMemberAdd is the slowest test we have #18983 . Thanks for removing flakes, but maybe you have idea how to speed up the test?

@ahrtr
Copy link
Member Author

ahrtr commented Dec 9, 2024

TestMemberAdd is the slowest test

It's because it has too many sub cases: 5 * 4 * 2 = 40, and in some cases there is a 5 seconds sleep.

for _, learnerTc := range learnerTcs {
for _, quorumTc := range quorumTcs {
for _, clusterTc := range clusterTestCases() {

@ahrtr ahrtr merged commit 854bdd6 into etcd-io:main Dec 9, 2024
36 checks passed
@ahrtr ahrtr deleted the memberadd_test_20241209 branch December 9, 2024 12:35
@serathius
Copy link
Member

Right, we should think about how to remove the sleep.

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

Successfully merging this pull request may close these issues.

3 participants