tillrohrmann commented on a change in pull request #6876: [FLINK-10251] Handle
oversized response messages in AkkaRpcActor
URL: https://github.com/apache/flink/pull/6876#discussion_r246338572
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActorTest.java
##########
@@ -144,6 +147,68 @@ public void testMessageDiscarding() throws Exception {
rpcEndpoint.shutDown();
}
+ @Test(expected = ExecutionException.class)
+ public void testOversizedResponseMsg() throws Exception {
+ Configuration configuration = new Configuration();
+ configuration.setString(AkkaOptions.FRAMESIZE, "10 b");
+ AkkaRpcService rpcService = null;
+ OversizedResponseRpcEndpoint rpcEndpoint = null;
+ try {
+ rpcService = new TestingRemoteRpcService(configuration);
+
+ rpcEndpoint = new
OversizedResponseRpcEndpoint(rpcService);
+
+ OversizedResponseMsgRpcGateway rpcGateway =
rpcEndpoint.getSelfGateway(OversizedResponseMsgRpcGateway.class);
+
+ rpcEndpoint.start();
+
+ CompletableFuture<Byte[]> result =
rpcGateway.calculate();
+
+ result.get(timeout.getSize(), timeout.getUnit());
+
+ fail("Expected a ExecutionException about the
oversize");
+ } finally {
Review comment:
I think it would be good that we also check that the cause is a
`AkkaRpcException` and maybe even that the cause.cause is an `IOException`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services