Search in sources :

Example 1 with ReactiveResponseExecutor

use of org.apache.servicecomb.core.provider.consumer.ReactiveResponseExecutor in project incubator-servicecomb-java-chassis by apache.

the class EdgeInvocation method createInvocation.

@Override
protected void createInvocation() {
    ReferenceConfig referenceConfig = new ReferenceConfig();
    referenceConfig.setMicroserviceMeta(latestMicroserviceVersionMeta.getMicroserviceMeta());
    referenceConfig.setMicroserviceVersionRule(microserviceVersionRule.getVersionRule().getVersionRule());
    referenceConfig.setTransport(Const.ANY_TRANSPORT);
    this.invocation = InvocationFactory.forConsumer(referenceConfig, restOperationMeta.getOperationMeta(), null);
    this.invocation.setResponseExecutor(new ReactiveResponseExecutor());
}
Also used : ReferenceConfig(org.apache.servicecomb.core.provider.consumer.ReferenceConfig) ReactiveResponseExecutor(org.apache.servicecomb.core.provider.consumer.ReactiveResponseExecutor)

Example 2 with ReactiveResponseExecutor

use of org.apache.servicecomb.core.provider.consumer.ReactiveResponseExecutor in project incubator-servicecomb-java-chassis by apache.

the class TestReactiveResponseExecutor method testReactiveResponseExecutor.

@Test
public void testReactiveResponseExecutor() {
    ReactiveResponseExecutor executor = new ReactiveResponseExecutor();
    Runnable cmd = Mockito.mock(Runnable.class);
    boolean validAssert = true;
    try {
        executor.execute(cmd);
    } catch (Exception e) {
        validAssert = false;
    }
    Assert.assertTrue(validAssert);
}
Also used : ReactiveResponseExecutor(org.apache.servicecomb.core.provider.consumer.ReactiveResponseExecutor) Test(org.junit.Test)

Aggregations

ReactiveResponseExecutor (org.apache.servicecomb.core.provider.consumer.ReactiveResponseExecutor)2 ReferenceConfig (org.apache.servicecomb.core.provider.consumer.ReferenceConfig)1 Test (org.junit.Test)1