@Test public void assertExecutionSuccess() { JobExecutionEvent startEvent = new JobExecutionEvent("localhost", "127.0.0.1", "fake_task_id", "test_job", JobExecutionEvent.ExecutionSource.NORMAL_TRIGGER, 0); JobExecutionEvent successEvent = startEvent.executionSuccess(); assertNotNull(successEvent.getCompleteTime()); assertTrue(successEvent.isSuccess()); }
public JobExecutionEvent executionSuccess() { JobExecutionEvent result = new JobExecutionEvent(id, hostname, ip, taskId, jobName, source, shardingItem, startTime, completeTime, success, failureCause); result.setCompleteTime(new Date()); result.setSuccess(true); return result; }
JobExecutionEvent implements JobEvent { public JobExecutionEvent executionSuccess() { JobExecutionEvent result = new JobExecutionEvent(id, hostname, ip, taskId, jobName, source, shardingItem, startTime, completeTime, success, failureCause); result.setCompleteTime(new Date()); result.setSuccess(true); return result; } }
JobExecutionEvent implements JobEvent { public JobExecutionEvent executionSuccess() { JobExecutionEvent result = new JobExecutionEvent(id, hostname, ip, taskId, jobName, source, shardingItem, startTime, completeTime, success, failureCause); result.setCompleteTime(new Date()); result.setSuccess(true); return result; }  }
JobExecutionEvent implements JobEvent { public JobExecutionEvent executionSuccess() { JobExecutionEvent result = new JobExecutionEvent(id, hostname, ip, taskId, jobName, source, shardingItem, startTime, completeTime, success, failureCause); result.setCompleteTime(new Date()); result.setSuccess(true); return result; }  JobExecutionEvent executionSuccess(); JobExecutionEvent executionFailure(final String failureCause); }
JobExecutionEvent implements JobEvent { public JobExecutionEvent executionSuccess() { JobExecutionEvent result = new JobExecutionEvent(id, hostname, ip, taskId, jobName, source, shardingItem, startTime, completeTime, success, failureCause); result.setCompleteTime(new Date()); result.setSuccess(true); return result; }  JobExecutionEvent executionSuccess(); JobExecutionEvent executionFailure(final String failureCause);  }