Skip to content

bbr: Fix test flakes#578

Merged
lthibault merged 1 commit into
capnproto:mainfrom
matheusd:fix-bbr
Aug 6, 2024
Merged

bbr: Fix test flakes#578
lthibault merged 1 commit into
capnproto:mainfrom
matheusd:fix-bbr

Conversation

@matheusd

Copy link
Copy Markdown
Contributor

This fixes test flakes that happen due to timing of clock actions.

The tests involve multiple goroutines that access the current time of the clock, but it may happen that an Advance() call in the test happens before a read of the clock time to create a new timer, thus causing a test flake.

This issue is fixed by adding appropriate synchronization.

This fixes test flakes that happen due to timing of clock actions.

The tests involve multiple goroutines that access the current time of
the clock, but it may happen that an Advance() call in the test happens
before a read of the clock time to create a new timer, thus causing a
test flake.

This issue is fixed by adding appropriate synchronization.

@lthibault lthibault left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great find. TY for the fix! This will be a crazy huge help when diving back into flow-control code.

@lthibault lthibault merged commit 049154c into capnproto:main Aug 6, 2024
@matheusd matheusd deleted the fix-bbr branch August 7, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants