FlowManagerService { public void deleteFlow(String flowName) { flowManager.deleteFlow(flowName); dataHubService.deleteDocument("/flows/" + flowName + FLOW_FILE_EXTENSION, DatabaseKind.STAGING); dataHubService.deleteDocument("/flows/" + flowName + FLOW_FILE_EXTENSION, DatabaseKind.FINAL); }  List<FlowStepModel> getFlows(); FlowStepModel createFlow(String flowJson, boolean checkExists); FlowStepModel getFlow(String flowName, boolean fromRunFlow); List<String> getFlowNames(); JsonNode validateStep(String flowName, String stepId); void deleteFlow(String flowName); List<StepModel> getSteps(String flowName); StepModel getStep(String flowName, String stepId); StepModel createStep(String flowName, Integer stepOrder, String stepId, String stringStep); void deleteStep(String flowName, String stepId); synchronized FlowStepModel runFlow(String flowName, List<String> steps); FlowStepModel stop(String flowName); static final String FLOW_FILE_EXTENSION; }
@Test void deleteFlow() throws InterruptedException { List<String> flowList = flowManagerService.getFlowNames(); assertEquals(2, flowList.size()); flowManagerService.deleteFlow(FLOW); flowManagerService.deleteFlow(FLOWWITHCOMMONSTEPS); flowList = flowManagerService.getFlowNames(); assertEquals(0, flowList.size()); Thread.sleep(1000); DocumentPage doc = stagingDocMgr.read("/flows/" + FLOW + ".flow.json"); assertFalse(doc.hasNext()); doc = finalDocMgr.read("/flows/" + FLOW + ".flow.json"); assertFalse(doc.hasNext()); }