use of org.apache.ignite.internal.processors.service.DummyService in project ignite by apache.
the class SqlViewExporterSpiTest method testServices.
/**
*/
@Test
public void testServices() throws Exception {
ServiceConfiguration srvcCfg = new ServiceConfiguration();
srvcCfg.setName("service");
srvcCfg.setMaxPerNodeCount(1);
srvcCfg.setService(new DummyService());
ignite0.services().deploy(srvcCfg);
List<List<?>> srvs = execute(ignite0, "SELECT " + " NAME, " + " SERVICE_ID, " + " SERVICE_CLASS, " + " TOTAL_COUNT, " + " MAX_PER_NODE_COUNT, " + " CACHE_NAME, " + " AFFINITY_KEY, " + " NODE_FILTER, " + " STATICALLY_CONFIGURED, " + " ORIGIN_NODE_ID " + "FROM SYS.SERVICES");
assertEquals(ignite0.context().service().serviceDescriptors().size(), srvs.size());
List<?> sysView = srvs.iterator().next();
assertEquals(srvcCfg.getName(), sysView.get(0));
assertEquals(DummyService.class.getName(), sysView.get(2));
assertEquals(srvcCfg.getMaxPerNodeCount(), sysView.get(4));
}
Aggregations