Skip to content

Increase test coverage of PbjProtocolHandler #324

@rbair23

Description

@rbair23
### Tasks
- [ ] https://github.com/hashgraph/pbj/issues/326
- [x] Verify correct behavior if the content type is incorrect
- [x] Verify content type of "application/grpc" becomes "application/grpc+proto"
- [ ] Verify only the "identity" grpc-encoding is supported
- [ ] Verify the "timeout" works
- [ ] Verify missing the "timeout" results in no timeout
- [ ] Verify "application/grpc+json" and "application/grpc" and "application/grpc+proto" create the correct "options"
- [ ] Verify if "authority" is sent, it is passed to the options
- [ ] Verify a GrpcException in the service interface's "open" method is handled
- [ ] Verify an HttpException is not thrown by the "open" method
- [ ] Verify unknown exceptions thrown from the "open" method are handled correctly
- [ ] Verify the behavior if the client resets the stream *before* data is sent
- [ ] Verify the behavior if the client resets the stream *after some* data is sent but not all
- [ ] Verify the behavior if the client resets the stream *after* all data is sent
- [ ] Verify the behavior of data handling with a fuzz test for what bytes are sent on each call
- [ ] Verify the behavior of data handling if not all bytes needed are sent per call
- [ ] Verify the result if an unexpected error occurs while handling data bytes
- [ ] Verify behavior of data handling when all bytes have been sent and then an EOS is sent with no new bytes
- [ ] Verify the "deadlineFuture" is never left in limbo. It is always canceled in success or failure
- [ ] Verify the stream state is closed when the request/response is done (and that this is the right thing to do)
- [ ] Verify every response frame contains the correct stream ID

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions