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_r246340550
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActorTest.java
##########
@@ -429,4 +495,46 @@ protected AsynchronousPostStopEndpoint(RpcService
rpcService, CompletableFuture<
return postStopFuture;
}
}
+
+ //
-------------------------------------------------------------------------
+
+ interface OversizedResponseMsgRpcGateway extends RpcGateway {
+ CompletableFuture<Byte[]> calculate();
+ }
+
+ static class OversizedResponseRpcEndpoint extends TestRpcEndpoint
implements OversizedResponseMsgRpcGateway {
+
+ private volatile Byte[] bytes = new Byte[1024 * 10];
+
+ public OversizedResponseRpcEndpoint(RpcService rpcService) {
+ super(rpcService);
+ }
+
+ @Override
+ public CompletableFuture<Byte[]> calculate() {
+ return CompletableFuture.completedFuture(bytes);
+ }
+
+ public Byte[] getBytes() {
+ return bytes;
+ }
+
+ public void setBytes(Byte[] bytes) {
+ this.bytes = bytes;
+ }
+ }
+
+ static class TestingRemoteRpcService extends TestingRpcService {
Review comment:
No need for this `RpcService` if we properly simulate remote communication
by using a second `RpcService`.
----------------------------------------------------------------
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