Search in sources :

Example 1 with CseContext

use of org.apache.servicecomb.core.CseContext in project incubator-servicecomb-java-chassis by apache.

the class TestDynamicSchemaLoader method init.

@BeforeClass
public static void init() {
    UnitTestMeta.init();
    loader.setMicroserviceMetaManager(microserviceMetaManager);
    SchemaListenerManager schemaListenerManager = new SchemaListenerManager();
    schemaListenerManager.setSchemaListenerList(Collections.emptyList());
    CseContext context = CseContext.getInstance();
    context.setSchemaLoader(loader);
    context.setSchemaListenerManager(schemaListenerManager);
    ServiceRegistry serviceRegistry = ServiceRegistryFactory.createLocal();
    serviceRegistry.init();
    microservice = serviceRegistry.getMicroservice();
    RegistryUtils.setServiceRegistry(serviceRegistry);
}
Also used : CseContext(org.apache.servicecomb.core.CseContext) ServiceRegistry(org.apache.servicecomb.serviceregistry.ServiceRegistry) BeforeClass(org.junit.BeforeClass)

Aggregations

CseContext (org.apache.servicecomb.core.CseContext)1 ServiceRegistry (org.apache.servicecomb.serviceregistry.ServiceRegistry)1 BeforeClass (org.junit.BeforeClass)1