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

Improve connection establishment tests #529

Merged
merged 1 commit into from
Jun 30, 2024
Merged

Conversation

jlaine
Copy link
Contributor

@jlaine jlaine commented Jun 30, 2024

Before we attempt to refactor packet / datagram padding, we need to finely capture the current behaviour, so:

  • Add a detailed test for connection establishment without packet loss.

  • Exhaustively check the events emitted by client / server at each step with an assertEvents helper.

  • Check the unacknowledged sent packets at each step with an assertSentPackets helper.

  • Make use of the client_and_server() helper instead of manually spinning up client and server instances.

Copy link

codecov bot commented Jun 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (c411453) to head (d6058c7).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #529   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines         5092      5092           
=========================================
  Hits          5092      5092           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Before we attempt to refactor packet / datagram padding, we need to
finely capture the current behaviour, so:

- Add a detailed test for connection establishment without packet loss.

- Exhaustively check the events emitted by client / server at each
  step with an `assertEvents` helper.

- Check the unacknowledged sent packets at each step with an
  `assertSentPackets` helper.

- Make use of the `client_and_server()` helper instead  of manually
  spinning up client and server instances.
Copy link
Contributor

@rthalley rthalley left a comment

Choose a reason for hiding this comment

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

I like it!

@jlaine jlaine merged commit aadd4be into aiortc:main Jun 30, 2024
29 checks passed
@jlaine jlaine deleted the connect-tests branch June 30, 2024 23:08
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.

None yet

2 participants