Search in sources :

Example 1 with ITSCBRestTemplate

use of org.apache.servicecomb.it.extend.engine.ITSCBRestTemplate in project incubator-servicecomb-java-chassis by apache.

the class Test3rdPartyInvocation method beforeClass.

@BeforeClass
public static void beforeClass() {
    String endpoint = ((ITSCBRestTemplate) consumersJaxrs.getSCBRestTemplate()).getAddress(Const.RESTFUL);
    RegistrationManager.INSTANCE.registerMicroserviceMappingByEndpoints(THIRD_PARTY_MICROSERVICE_NAME, "1.2.1", Collections.singletonList(endpoint), DataTypeJaxrsSchemaIntf.class);
    MicroserviceInstance instance = new MicroserviceInstance();
    instance.setEndpoints(Collections.singletonList(endpoint));
    RegistrationManager.INSTANCE.registerMicroserviceMapping(ASYNC_THIRD_PARTY_MICROSERVICE_NAME, "1.1.1", Collections.singletonList(instance), DataTypeJaxrsSchemaAsyncIntf.class);
    dataTypeJaxrsSchema = Invoker.createProxy(THIRD_PARTY_MICROSERVICE_NAME, THIRD_PARTY_MICROSERVICE_NAME, DataTypeJaxrsSchemaIntf.class);
    dataTypeJaxrsSchemaAsync = Invoker.createProxy(ASYNC_THIRD_PARTY_MICROSERVICE_NAME, ASYNC_THIRD_PARTY_MICROSERVICE_NAME, DataTypeJaxrsSchemaAsyncIntf.class);
}
Also used : MicroserviceInstance(org.apache.servicecomb.registry.api.registry.MicroserviceInstance) ITSCBRestTemplate(org.apache.servicecomb.it.extend.engine.ITSCBRestTemplate) BeforeClass(org.junit.BeforeClass)

Example 2 with ITSCBRestTemplate

use of org.apache.servicecomb.it.extend.engine.ITSCBRestTemplate in project java-chassis by ServiceComb.

the class Test3rdPartyInvocation method beforeClass.

@BeforeClass
public static void beforeClass() {
    String endpoint = ((ITSCBRestTemplate) consumersJaxrs.getSCBRestTemplate()).getAddress(Const.RESTFUL);
    RegistrationManager.INSTANCE.registerMicroserviceMappingByEndpoints(THIRD_PARTY_MICROSERVICE_NAME, "1.2.1", Collections.singletonList(endpoint), DataTypeJaxrsSchemaIntf.class);
    MicroserviceInstance instance = new MicroserviceInstance();
    instance.setEndpoints(Collections.singletonList(endpoint));
    RegistrationManager.INSTANCE.registerMicroserviceMapping(ASYNC_THIRD_PARTY_MICROSERVICE_NAME, "1.1.1", Collections.singletonList(instance), DataTypeJaxrsSchemaAsyncIntf.class);
    dataTypeJaxrsSchema = Invoker.createProxy(THIRD_PARTY_MICROSERVICE_NAME, THIRD_PARTY_MICROSERVICE_NAME, DataTypeJaxrsSchemaIntf.class);
    dataTypeJaxrsSchemaAsync = Invoker.createProxy(ASYNC_THIRD_PARTY_MICROSERVICE_NAME, ASYNC_THIRD_PARTY_MICROSERVICE_NAME, DataTypeJaxrsSchemaAsyncIntf.class);
}
Also used : MicroserviceInstance(org.apache.servicecomb.registry.api.registry.MicroserviceInstance) ITSCBRestTemplate(org.apache.servicecomb.it.extend.engine.ITSCBRestTemplate) BeforeClass(org.junit.BeforeClass)

Aggregations

ITSCBRestTemplate (org.apache.servicecomb.it.extend.engine.ITSCBRestTemplate)2 MicroserviceInstance (org.apache.servicecomb.registry.api.registry.MicroserviceInstance)2 BeforeClass (org.junit.BeforeClass)2