Skip to content

Commit

Permalink
[hotfix][tests] Remove mocks from RestClusterClientTest
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Jan 3, 2019
1 parent 903a909 commit 7ce6375
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import org.apache.flink.runtime.client.JobStatusMessage;
import org.apache.flink.runtime.clusterframework.ApplicationStatus;
import org.apache.flink.runtime.concurrent.FutureUtils;
import org.apache.flink.runtime.dispatcher.Dispatcher;
import org.apache.flink.runtime.dispatcher.DispatcherGateway;
import org.apache.flink.runtime.jobgraph.JobGraph;
import org.apache.flink.runtime.jobgraph.JobStatus;
Expand Down Expand Up @@ -88,6 +87,7 @@
import org.apache.flink.runtime.rest.util.RestClientException;
import org.apache.flink.runtime.rpc.RpcUtils;
import org.apache.flink.runtime.util.ExecutorThreadFactory;
import org.apache.flink.runtime.webmonitor.TestingDispatcherGateway;
import org.apache.flink.runtime.webmonitor.retriever.GatewayRetriever;
import org.apache.flink.util.ConfigurationException;
import org.apache.flink.util.ExceptionUtils;
Expand All @@ -106,8 +106,6 @@
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;

import javax.annotation.Nonnull;

Expand Down Expand Up @@ -151,10 +149,8 @@
*/
public class RestClusterClientTest extends TestLogger {

@Mock
private Dispatcher mockRestfulGateway;
private final DispatcherGateway mockRestfulGateway = new TestingDispatcherGateway.Builder().build();

@Mock
private GatewayRetriever<DispatcherGateway> mockGatewayRetriever;

private RestServerEndpointConfiguration restServerEndpointConfiguration;
Expand All @@ -180,8 +176,6 @@ public class RestClusterClientTest extends TestLogger {

@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);

restServerEndpointConfiguration = RestServerEndpointConfiguration.fromConfiguration(restConfig);
mockGatewayRetriever = () -> CompletableFuture.completedFuture(mockRestfulGateway);

Expand Down

0 comments on commit 7ce6375

Please sign in to comment.