[ 
https://issues.apache.org/jira/browse/FLINK-4434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15430619#comment-15430619
 ] 

ASF GitHub Bot commented on FLINK-4434:
---------------------------------------

Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2394#discussion_r75664816
  
    --- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/rpc/TestingRpcService.java 
---
    @@ -0,0 +1,115 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.flink.runtime.rpc;
    +
    +import akka.dispatch.Futures;
    +import akka.util.Timeout;
    +
    +import org.apache.flink.configuration.Configuration;
    +import org.apache.flink.runtime.akka.AkkaUtils;
    +import org.apache.flink.runtime.rpc.akka.AkkaRpcService;
    +
    +import scala.concurrent.Future;
    +import scala.concurrent.duration.FiniteDuration;
    +
    +import java.util.concurrent.ConcurrentHashMap;
    +import java.util.concurrent.TimeUnit;
    +
    +import static org.apache.flink.util.Preconditions.checkNotNull;
    +
    +/**
    + * An RPC Service implementation for testing. This RPC service acts as a 
replacement for
    + * teh regular RPC service for cases where tests need to return prepared 
mock gateways instead of
    --- End diff --
    
    typoe `teh` => `the`


> Add a testing RPC service
> -------------------------
>
>                 Key: FLINK-4434
>                 URL: https://issues.apache.org/jira/browse/FLINK-4434
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Distributed Coordination
>            Reporter: Stephan Ewen
>            Assignee: Stephan Ewen
>             Fix For: 1.2.0
>
>
> I suggest to add a simple testing RPC service that allows to register mock 
> gateways under certain names.
> That way, if a component connects to another component via the RPC service, 
> it will call the mock gateway, rather than the proper proxy gateway that will 
> try to send actor messages.
> Tests on mocks are very easy and powerful with tools like Mockito.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to