use of org.apache.oozie.service.UUIDService in project oozie by apache.
the class TestWorkflowKillXCommand method testChildId.
public void testChildId() throws Exception {
services.destroy();
setSystemProperty(UUIDService.CONF_GENERATOR, "counter");
services = new Services();
services.init();
UUIDService uuid = services.get(UUIDService.class);
String id = uuid.generateId(ApplicationType.WORKFLOW);
String childId = uuid.generateChildId(id, "a");
assertEquals(id, uuid.getId(childId));
assertEquals("a", uuid.getChildName(childId));
services.destroy();
setSystemProperty(UUIDService.CONF_GENERATOR, "random");
services = new Services();
services.init();
uuid = services.get(UUIDService.class);
id = uuid.generateId(ApplicationType.WORKFLOW);
childId = uuid.generateChildId(id, "a");
assertEquals(id, uuid.getId(childId));
assertEquals("a", uuid.getChildName(childId));
}
Aggregations