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

deflake TestTracing #15501

Merged
merged 1 commit into from
Mar 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/integration/tracing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ func TestTracing(t *testing.T) {

select {
case <-etcdSrv.Server.ReadyNotify():
case <-time.After(1 * time.Second):
case <-time.After(5 * time.Second):
// default randomized election timeout is 1 to 2s, single node will fast-forward 900ms
// change the timeout from 1 to 5 seconds to ensure de-flaking this test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change makes sense to me. But could you please clarify what does "single node will fast-forward 900ms" mean?

Copy link
Member Author

@chaochn47 chaochn47 Mar 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    logger.go:130: 2023-03-16T02:01:04.478Z	INFO	default	started as single-node; fast-forwarding election ticks	{"local-member-id": "8e9e05c52164694d", "forward-ticks": 9, "forward-duration": "900ms", "election-ticks": 10, "election-timeout": "1s"}

Theoretically maximum wait time for the leader of the single node cluster to be elected should be 2s - 900ms = 1.1s, not including MsgVote and Response round trip.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx for the clarification.

t.Fatalf("failed to start embed.Etcd for test")
}

Expand Down