Skip to content

[FLINK-4434] [rpc] Add a testing RPC service.#2394

Closed
StephanEwen wants to merge 1 commit intoapache:flip-6from
StephanEwen:test_rpc_service
Closed

[FLINK-4434] [rpc] Add a testing RPC service.#2394
StephanEwen wants to merge 1 commit intoapache:flip-6from
StephanEwen:test_rpc_service

Conversation

@StephanEwen
Copy link
Contributor

Adds an RPC Service implementation for testing. This RPC service acts as a replacement for the regular RPC service for cases where tests need to return prepared mock gateways instead of proper RPC gateways.

The TestingRpcService can be used for example in the following fashion, using Mockito for mocks and verification:

TestingRpcService rpc = new TestingRpcService();

ResourceManagerGateway testGateway = mock(ResourceManagerGateway.class);
rpc.registerGateway("myAddress", testGateway);

MyComponentToTest component = new MyComponentToTest();
component.triggerSomethingThatCallsTheGateway();

verify(testGateway, timeout(1000)).theTestMethod(any(UUID.class), anyString());

This also adds a utility to create futures with a predetermined timeout.

@tillrohrmann
Copy link
Contributor

Changes look very good to me :-) Thanks for your work @StephanEwen. Will merge this PR.

tillrohrmann pushed a commit to tillrohrmann/flink that referenced this pull request Aug 22, 2016

/**
* 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typoe teh => the

@uce
Copy link
Contributor

uce commented Aug 22, 2016

Cool stuff! Really looking forward to when this is merged back to master some day. 👍

@StephanEwen
Copy link
Contributor Author

Manually merged to the flip-6 branch in eee1497

StephanEwen added a commit to StephanEwen/flink that referenced this pull request Aug 25, 2016
asfgit pushed a commit that referenced this pull request Sep 8, 2016
tillrohrmann pushed a commit to tillrohrmann/flink that referenced this pull request Sep 21, 2016
tillrohrmann pushed a commit to tillrohrmann/flink that referenced this pull request Sep 27, 2016
asfgit pushed a commit that referenced this pull request Oct 2, 2016
asfgit pushed a commit that referenced this pull request Oct 6, 2016
StephanEwen added a commit to StephanEwen/flink that referenced this pull request Oct 14, 2016
asfgit pushed a commit that referenced this pull request Oct 21, 2016
tillrohrmann pushed a commit to tillrohrmann/flink that referenced this pull request Oct 31, 2016
tillrohrmann pushed a commit to tillrohrmann/flink that referenced this pull request Oct 31, 2016
asfgit pushed a commit that referenced this pull request Nov 1, 2016
StephanEwen added a commit to StephanEwen/flink that referenced this pull request Dec 23, 2016
StephanEwen added a commit to StephanEwen/flink that referenced this pull request Dec 23, 2016
StephanEwen added a commit to StephanEwen/flink that referenced this pull request Dec 23, 2016
liuyuzhong7 pushed a commit to liuyuzhong7/flink that referenced this pull request Jan 4, 2017
liuyuzhong7 pushed a commit to liuyuzhong7/flink that referenced this pull request Jan 17, 2017
joseprupi pushed a commit to joseprupi/flink that referenced this pull request Feb 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants