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

Cleanup HTTP/2 tests for Http2FrameCodec and Http2MultiplexCodec #8646

Merged
merged 4 commits into from
Dec 14, 2018

Conversation

normanmaurer
Copy link
Member

Motiviation:

Http2FrameCodecTest and Http2MultiplexCodecTest were quite fragile and often not went through the whole pipeline which made testing sometimes hard and error-prone.

Modification:

  • Refactor tests to have data flow through the whole pipeline and so made the test more robust (by testing the while implementation).

Result:

Easier to write tests for the codecs in the future and more robust testing in general.

Beside this it also fixes #6036.

@normanmaurer normanmaurer force-pushed the http2_test_cleanup branch 3 times, most recently from a359f72 to 5893d4e Compare December 10, 2018 19:04
@bryce-anderson
Copy link
Contributor

Looks like you're still iterating on this. Please feel free to ping me when you want it reviewed.

@normanmaurer
Copy link
Member Author

@bryce-anderson now... forgot to commit a change.

Motiviation:

Http2FrameCodecTest and Http2MultiplexCodecTest were quite fragile and often not went through the whole pipeline which made testing sometimes hard and error-prone.

Modification:

- Refactor tests to have data flow through the whole pipeline and so made the test more robust (by testing the while implementation).

Result:

Easier to write tests for the codecs in the future and more robust testing in general.

Beside this it also fixes #6036.
@normanmaurer normanmaurer added this to the 4.1.33.Final milestone Dec 10, 2018
Copy link
Contributor

@bryce-anderson bryce-anderson left a comment

Choose a reason for hiding this comment

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

looks good, though I must admit that I wasn't very thorough: this is a whole lot of code to review that I haven't spent a lot of time looking at.

@@ -415,27 +415,11 @@ final void onChannelReadComplete(ChannelHandlerContext ctx) {
}

// Allow to override for testing
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is no longer true.

@normanmaurer
Copy link
Member Author

@bryce-anderson thanks fore the review.. I also addressed your comment (good catch).

@normanmaurer normanmaurer merged this pull request into 4.1 Dec 14, 2018
@normanmaurer normanmaurer deleted the http2_test_cleanup branch December 14, 2018 10:10
normanmaurer added a commit that referenced this pull request Dec 14, 2018
Motiviation:

Http2FrameCodecTest and Http2MultiplexCodecTest were quite fragile and often not went through the whole pipeline which made testing sometimes hard and error-prone.

Modification:

- Refactor tests to have data flow through the whole pipeline and so made the test more robust (by testing the while implementation).

Result:

Easier to write tests for the codecs in the future and more robust testing in general.

Beside this it also fixes #6036.
normanmaurer added a commit that referenced this pull request Dec 28, 2018
Motiviation:

Http2FrameCodecTest and Http2MultiplexCodecTest were quite fragile and often not went through the whole pipeline which made testing sometimes hard and error-prone.

Modification:

- Refactor tests to have data flow through the whole pipeline and so made the test more robust (by testing the while implementation).

Result:

Easier to write tests for the codecs in the future and more robust testing in general.

Beside this it also fixes #6036.
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.

Http2FrameCodecTest use of spy for mocking
2 participants