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

add test #1450

Merged
merged 12 commits into from
Jul 19, 2023
Merged

add test #1450

merged 12 commits into from
Jul 19, 2023

Conversation

KershawChang
Copy link
Collaborator

This is the test for #1447

Copy link
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

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

I think we need two tests and some small changes, as noted below.


// Create a stream and send some data.
let stream_id = client.stream_create(StreamType::BiDi).unwrap();
client.stream_send(stream_id, &[6; 100]).unwrap();
Copy link
Member

Choose a reason for hiding this comment

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

Ok, so is the datagram too big to fit in a packet that has this stream data as well? I'd send a little more to ensure that is the case.

If it is, then that is good. Then you want to:

  1. have the client create two packets. the first should be smaller than the datagram size, which you can check
  2. have the server process the first. it should receive stream data, but not a datagram event
  3. have the server process the second. it should receive the datagram event then

We probably shouldn't rely on the order of events here. That's not something we'd want to promise in the API unless we really had to (and we don't).

Then add another test that sends low priority stream data first and observe the opposite inversion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do

@martinthomson
Copy link
Member

Note that we're also seeing this new test fail.

martinthomson and others added 6 commits July 10, 2023 13:22
@KershawChang
Copy link
Collaborator Author

Note that we're also seeing this new test fail.

I'll push a new commit that includes every thing to make the test pass.

@KershawChang KershawChang force-pushed the datagram_after_stream_data branch from 185ddc1 to 08a5001 Compare July 10, 2023 15:42
Copy link
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

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

A small suggestion for you regarding the tests, that's all.

@KershawChang KershawChang force-pushed the datagram_after_stream_data branch from a9c1009 to 92724e8 Compare July 19, 2023 15:00
@KershawChang KershawChang merged commit 514cae0 into mozilla:main Jul 19, 2023
@KershawChang KershawChang deleted the datagram_after_stream_data branch July 19, 2023 15:09
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