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 debuging HTTP/2 tests #94530

Merged
merged 3 commits into from
Nov 9, 2023
Merged

improve debuging HTTP/2 tests #94530

merged 3 commits into from
Nov 9, 2023

Conversation

wfurt
Copy link
Member

@wfurt wfurt commented Nov 8, 2023

I bump to two issue while working on #94112

  1. I was using the SSLKEYLOG environment so I can decrypt TLS and peek at the HTTP/2 exchange.
    However, often the sessions keys were not there and I failed to decrypt the transaction. It seems like when the handshake happens and the process exist immediately not everything is written. Adding Flush seems to fix this.
    It may come with some perf cost but this is Debug only feature so it should not matter as much.

  2. The issue would happen only when running whole test suite. I wanted to instrument the test to spit out the IPEndPoints so I can find the connection among many in the capture file. So I added ToString that can giver me something like
    Http2LoopbackConnection 127.0.0.1:42543 <-> 127.0.0.1:60302

with that I can set filer in Wireshark as tcp.port==42543 and get

failTest

@wfurt wfurt added the test-enhancement Improvements of test source code label Nov 8, 2023
@wfurt wfurt added this to the 9.0.0 milestone Nov 8, 2023
@wfurt wfurt requested a review from a team November 8, 2023 19:22
@wfurt wfurt self-assigned this Nov 8, 2023
@ghost
Copy link

ghost commented Nov 8, 2023

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

I bump to two issue while working on #94112

  1. I was using the SSLKEYLOG environment so I can decrypt TLS and peek at the HTTP/2 exchange.
    However, often the sessions keys were not there and I failed to decrypt the transaction. It seems like when the handshake happens and the process exist immediately not everything is written. Adding Flush seems to fix this.
    It may come with some perf cost but this is Debug only feature so it should not matter as much.

  2. The issue would happen only when running whole test suite. I wanted to instrument the test to spit out the IPEndPoints so I can find the connection among many in the capture file. So I added ToString that can giver me something like
    Http2LoopbackConnection 127.0.0.1:42543 <-> 127.0.0.1:60302

with that I can set filer in Wireshark as tcp.port==42543 and get

failTest
Author: wfurt
Assignees: wfurt
Labels:

area-System.Net.Http, test-enhancement

Milestone: 9.0.0

@wfurt wfurt merged commit df30ff8 into dotnet:main Nov 9, 2023
109 checks passed
@wfurt wfurt deleted the testDebug branch November 9, 2023 19:07
@wfurt wfurt restored the testDebug branch November 9, 2023 19:07
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Http test-enhancement Improvements of test source code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants