use of org.sonar.db.ce.CeQueueDto in project sonarqube by SonarSource.
the class PurgeCeActivitiesTest method insertWithDate.
private void insertWithDate(String uuid, long date) {
CeQueueDto queueDto = new CeQueueDto();
queueDto.setUuid(uuid);
queueDto.setTaskType(CeTaskTypes.REPORT);
CeActivityDto dto = new CeActivityDto(queueDto);
dto.setStatus(CeActivityDto.Status.SUCCESS);
when(system2.now()).thenReturn(date);
dbTester.getDbClient().ceActivityDao().insert(dbTester.getSession(), dto);
dbTester.getSession().commit();
}
use of org.sonar.db.ce.CeQueueDto in project sonarqube by SonarSource.
the class CeQueueCleanerTest method insertInQueue.
private CeQueueDto insertInQueue(String taskUuid, CeQueueDto.Status status) throws IOException {
CeQueueDto dto = new CeQueueDto();
dto.setTaskType(CeTaskTypes.REPORT);
dto.setComponentUuid("PROJECT_1");
dto.setUuid(taskUuid);
dto.setStatus(status);
dbTester.getDbClient().ceQueueDao().insert(dbTester.getSession(), dto);
dbTester.getSession().commit();
return dto;
}
Aggregations