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

test: add compliance tests for different types of stream sending #2398

Merged
merged 3 commits into from
Feb 7, 2024

Conversation

achingbrain
Copy link
Member

To ensure we can send data over libp2p streams in the various supported ways, add extra tests to the interface compliance suite.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

To ensure we can send data over libp2p streams in the various
supported ways, add extra tests to the interface compliance suite.
@achingbrain achingbrain requested a review from a team as a code owner February 7, 2024 14:43
achingbrain added a commit to ChainSafe/js-libp2p-yamux that referenced this pull request Feb 7, 2024
When a stream is closed gracefully, it's status goes from `'open'`
to `'closing'` then to either `'closed'`, `'aborted'` or `'reset'`.

While it's `'closing'` we should still try to send any queued data,
this can be aborted by calling `.abort` on the stream or by the
signal passed to `.close` firing the `'abort'` event.

This change makes the tests added in libp2p/js-libp2p#2398
pass.
@achingbrain achingbrain merged commit 9891ecd into main Feb 7, 2024
22 checks passed
@achingbrain achingbrain deleted the test/add-stream-transfer-tests branch February 7, 2024 15:13
wemeetagain pushed a commit to ChainSafe/js-libp2p-yamux that referenced this pull request Feb 7, 2024
When a stream is closed gracefully, it's status goes from `'open'`
to `'closing'` then to either `'closed'`, `'aborted'` or `'reset'`.

While it's `'closing'` we should still try to send any queued data,
this can be aborted by calling `.abort` on the stream or by the
signal passed to `.close` firing the `'abort'` event.

This change makes the tests added in libp2p/js-libp2p#2398
pass.
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.

1 participant