Skip to content

Conversation

@teskje
Copy link
Contributor

@teskje teskje commented Dec 4, 2025

When injecting network faults (partition, hold) into a link, also update the state of messages already in the sent queue, instead of having the fault only affect messages that are enqueued in the future.

This changes enables writing tests in which one observes the contents of a link to find the point in time in which a given message is sent, to then prevent that message from getting delivered.

Closes #251

@teskje teskje marked this pull request as ready for review December 4, 2025 09:29
Copy link
Contributor

@mcches mcches left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. A couple minor comments.

@mcches
Copy link
Contributor

mcches commented Dec 10, 2025

Also note that barriers landed in a recent PR, which is worth checking out.

When injecting network faults (partition, hold) into a link, also update
the state of messages already in the `sent` queue, instead of having the
fault only affect messages that are enqueued in the future.

This changes enables writing tests in which one observes the contents of
a link to find the point in time in which a given message is sent, to
then prevent that message from getting delivered.
@teskje teskje force-pushed the faults-affect-sent branch from 76f2117 to e8d5f2a Compare December 11, 2025 14:05
@teskje teskje requested a review from mcches December 11, 2025 14:06
@mcches mcches merged commit 61891a3 into tokio-rs:main Dec 16, 2025
6 checks passed
@teskje teskje deleted the faults-affect-sent branch December 25, 2025 11:47
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.

Injected network faults don't affect messages on links

2 participants