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

00321 incorrect handling of bad content type #322

Merged
merged 2 commits into from
Nov 15, 2024

Conversation

rbair23
Copy link
Member

@rbair23 rbair23 commented Nov 15, 2024

Description:

  • Initialized the deadlineFuture to avoid an NPE.
  • Does NOT use a default content type, but allows it to be null. This is useful so we report back to the user exactly what they sent us, and not assume empty means text/plain
  • Switches from StreamFlowControl to FlowControl.Outbound for easier testing (one is a class we cannot extend, one is an interface)
  • Adds a grpc-message compatible with go gRPC server
  • Adds a test case verifying the correct behavior (and, incidentally, it fails when the fixes are not enabled.)

Signed-off-by: Richard Bair <rbair23@users.noreply.github.com>
Signed-off-by: Richard Bair <rbair23@users.noreply.github.com>
@rbair23 rbair23 requested review from a team as code owners November 15, 2024 19:51
@rbair23 rbair23 linked an issue Nov 15, 2024 that may be closed by this pull request
Copy link

JUnit Test Report

   67 files  +1     67 suites  +1   2m 29s ⏱️ -1s
1 247 tests +3  1 244 ✅ +3   3 💤 ±0  0 ❌ ±0 
7 102 runs  +3  7 083 ✅ +3  19 💤 ±0  0 ❌ ±0 

Results for commit c521bc0. ± Comparison against base commit 44991ec.

This pull request removes 2 and adds 4 tests. Note that renamed tests count towards both.
, 1
com.hedera.pbj.runtime.Utf8ToolsTest ‑ [4] 
com.hedera.pbj.grpc.helidon.PbjProtocolHandlerTest ‑ [1] 
com.hedera.pbj.grpc.helidon.PbjProtocolHandlerTest ‑ [2] text/plain
com.hedera.pbj.grpc.helidon.PbjProtocolHandlerTest ‑ [3] application/json
com.hedera.pbj.runtime.Utf8ToolsTest ‑ [4] 
, 1

Copy link

Integration Test Report

    297 files  +1      297 suites  +1   8m 40s ⏱️ + 1m 29s
104 157 tests +4  104 157 ✅ +4  0 💤 ±0  0 ❌ ±0 
104 385 runs  +4  104 385 ✅ +4  0 💤 ±0  0 ❌ ±0 

Results for commit c521bc0. ± Comparison against base commit 44991ec.

This pull request removes 3 and adds 7 tests. Note that renamed tests count towards both.
com.hedera.pbj.intergration.test.ParserNeverWrapsTest ‑ [1] com.hedera.pbj.intergration.test.ParserNeverWrapsTest$$Lambda/0x00007f42a050fd90@3aea9ef3
com.hedera.pbj.intergration.test.ParserNeverWrapsTest ‑ [2] com.hedera.pbj.intergration.test.ParserNeverWrapsTest$$Lambda/0x00007f42a050d000@23247fdf
com.hedera.pbj.intergration.test.ParserNeverWrapsTest ‑ [3] com.hedera.pbj.intergration.test.ParserNeverWrapsTest$$Lambda/0x00007f42a050d238@a05c95f
com.hedera.hapi.node.state.schedule.tests.ScheduleIdListTest ‑ [1] NoToStringWrapper{com.hedera.hapi.node.state.schedule.ScheduleIdList}
com.hedera.hapi.node.state.schedule.tests.ScheduleIdListTest ‑ [2] NoToStringWrapper{com.hedera.hapi.node.state.schedule.ScheduleIdList}
com.hedera.hapi.node.state.schedule.tests.ScheduleIdListTest ‑ [3] NoToStringWrapper{com.hedera.hapi.node.state.schedule.ScheduleIdList}
com.hedera.hapi.node.state.schedule.tests.ScheduleIdListTest ‑ testTestEqualsAndHashCode()
com.hedera.pbj.intergration.test.ParserNeverWrapsTest ‑ [1] com.hedera.pbj.intergration.test.ParserNeverWrapsTest$$Lambda/0x00007f585c4f7510@96f0372
com.hedera.pbj.intergration.test.ParserNeverWrapsTest ‑ [2] com.hedera.pbj.intergration.test.ParserNeverWrapsTest$$Lambda/0x00007f585c4f7748@1375bbb6
com.hedera.pbj.intergration.test.ParserNeverWrapsTest ‑ [3] com.hedera.pbj.intergration.test.ParserNeverWrapsTest$$Lambda/0x00007f585c4f7980@18bb642b

@rbair23 rbair23 merged commit 383b410 into main Nov 15, 2024
10 checks passed
@rbair23 rbair23 deleted the 00321-incorrect-handling-of-bad-content-type branch November 15, 2024 20:35
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.

Incorrect handling of bad content type
3 participants