Search in sources :

Example 16 with TaskResultStatistics

use of com.dangdang.ddframe.job.statistics.type.task.TaskResultStatistics in project elastic-job by dangdangdotcom.

the class CloudJobRestfulApiTest method assertGetTaskResultStatisticsWithErrorPathParameter.

@Test
public void assertGetTaskResultStatisticsWithErrorPathParameter() throws Exception {
    String result = sentGetRequest("http://127.0.0.1:19000/job/statistics/tasks/results/errorPath");
    TaskResultStatistics taskResultStatistics = GsonFactory.getGson().fromJson(result, TaskResultStatistics.class);
    assertThat(taskResultStatistics.getSuccessCount(), is(0));
    assertThat(taskResultStatistics.getFailedCount(), is(0));
}
Also used : TaskResultStatistics(com.dangdang.ddframe.job.statistics.type.task.TaskResultStatistics) Test(org.junit.Test)

Aggregations

TaskResultStatistics (com.dangdang.ddframe.job.statistics.type.task.TaskResultStatistics)16 Test (org.junit.Test)12 StatisticInterval (com.dangdang.ddframe.job.statistics.StatisticInterval)10 Date (java.util.Date)10 Connection (java.sql.Connection)3 PreparedStatement (java.sql.PreparedStatement)3 ResultSet (java.sql.ResultSet)3 SQLException (java.sql.SQLException)3 SimpleDateFormat (java.text.SimpleDateFormat)2 LinkedList (java.util.LinkedList)1