ExecutionServiceTest.java 文件源码

java
阅读 32 收藏 0 点赞 0 评论 0

项目:score 作者:
@Test
public void handlePausedFlow_UserPausedTest() throws InterruptedException {
    final Long executionId = 111L;
    final String branch_id = null;

    Execution exe = getExecutionObjToPause(executionId, branch_id);

    ExecutionSummary execSummary = new ExecutionSummary();
    execSummary.setPauseReason(PauseReason.USER_PAUSED);
    execSummary.setStatus(ExecutionStatus.PENDING_PAUSE);
    when(workerConfigurationService.isExecutionPaused(executionId, branch_id)).thenReturn(true);
    when(pauseResumeService.readPausedExecution(executionId, branch_id)).thenReturn(execSummary);

    boolean result = executionService.handlePausedFlow(exe);

    Mockito.verify(pauseResumeService, VerificationModeFactory.times(1)).writeExecutionObject(executionId, branch_id, exe);
    Assert.assertTrue(result);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号