Github user adeneche commented on the pull request:
https://github.com/apache/drill/pull/446#issuecomment-212488188
So I spent more time looking at ways to create a unit test for this, and I
don't think it's possible:
First, current implementation of ProtobufLengthDecoder for the data tunnel
uses the root allocator, which is weird and changing the rpc max allocation
won't help in this case.
Second, even after I changed the implementation and made sure
ProtobufLengthDecoder uses the rpc allocator, this same allocator is used by
netty too and you can't control where it will run out of memory, in most of my
experiments it run out of memory in ByteToMessageDecoder, so writing a unit
test using this won't be reliable as it won't consistently reproduce the issue.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---