@Test @SneakyThrows public void assertFindJobExecutionEvents() { when(resultSet.getString(5)).thenReturn("TestJobName"); when(resultSet.getString(6)).thenReturn("FAILOVER"); when(resultSet.getString(7)).thenReturn("1"); when(resultSet.getTimestamp(8)).thenReturn(new Timestamp(System.currentTimeMillis())); Map<String, Object> fields = new HashMap<>(); fields.put("job_name", "TestJobName"); condition = new JobEventRdbSearch.Condition(1, 10, "job_name", "ASC", new Date(), new Date(), fields); JobEventRdbSearch.Result<JobExecutionEvent> jobExecutionEvents = jobEventRdbSearch.findJobExecutionEvents(condition); assertThat(jobExecutionEvents.getTotal(), is(1)); assertThat(jobExecutionEvents.getRows().size(), is(1)); assertThat(jobExecutionEvents.getRows().get(0).getJobName(), is("TestJobName")); assertThat(jobExecutionEvents.getRows().get(0).getSource(), is(JobExecutionEvent.ExecutionSource.FAILOVER)); assertThat(jobExecutionEvents.getRows().get(0).getShardingItem(), is(1)); }
public Result<JobExecutionEvent> findJobExecutionEvents(final Condition condition) { return new Result<>(getEventCount(TABLE_JOB_EXECUTION_LOG, FIELDS_JOB_EXECUTION_LOG, condition), getJobExecutionEvents(condition)); }
JobEventRdbSearch { public Result<JobExecutionEvent> findJobExecutionEvents(final Condition condition) { return new Result<>(getEventCount(TABLE_JOB_EXECUTION_LOG, FIELDS_JOB_EXECUTION_LOG, condition), getJobExecutionEvents(condition)); } }
JobEventRdbSearch { public Result<JobExecutionEvent> findJobExecutionEvents(final Condition condition) { return new Result<>(getEventCount(TABLE_JOB_EXECUTION_LOG, FIELDS_JOB_EXECUTION_LOG, condition), getJobExecutionEvents(condition)); }  }
JobEventRdbSearch { public Result<JobExecutionEvent> findJobExecutionEvents(final Condition condition) { return new Result<>(getEventCount(TABLE_JOB_EXECUTION_LOG, FIELDS_JOB_EXECUTION_LOG, condition), getJobExecutionEvents(condition)); }  Result<JobExecutionEvent> findJobExecutionEvents(final Condition condition); Result<JobStatusTraceEvent> findJobStatusTraceEvents(final Condition condition); }
JobEventRdbSearch { public Result<JobExecutionEvent> findJobExecutionEvents(final Condition condition) { return new Result<>(getEventCount(TABLE_JOB_EXECUTION_LOG, FIELDS_JOB_EXECUTION_LOG, condition), getJobExecutionEvents(condition)); }  Result<JobExecutionEvent> findJobExecutionEvents(final Condition condition); Result<JobStatusTraceEvent> findJobStatusTraceEvents(final Condition condition);  }