Skip to content

Commit

Permalink
[HWKMETRICS-130] fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
John Sanda committed Jun 17, 2015
1 parent 0eac721 commit 13ffcac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,10 @@ public TaskImpl(TaskType taskType, DateTime timeSlice, String target, String sou
this.timeSlice = timeSlice;
this.target = target;
this.sources = ImmutableSet.of(source);
// this.interval = standardMinutes(interval);
// this.window = standardMinutes(window);
this.interval = interval;
this.window = window;
}

// public TaskImpl(TaskType taskType, DateTime timeSlice, String target, Set<String> sources, Duration interval,
// Duration window) {
// this.taskType = taskType;
// this.timeSlice = timeSlice;
// this.target = target;
// this.sources = sources;
// this.interval = interval;
// this.window = window;
// }

public TaskImpl(TaskType taskType, DateTime timeSlice, String target, Set<String> sources, int interval,
int window) {
this.taskType = taskType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void scheduleTaskUsingSeconds() throws Exception {
TaskServiceImpl taskService = new TaskServiceImpl(rxSession, queries, leaseService, singletonList(taskType));
taskService.setTimeUnit(TimeUnit.SECONDS);

DateTime expectedTimeSlice = dateTimeService.getTimeSlice(now(), standardSeconds(1)).plusSeconds(interval);
DateTime expectedTimeSlice = dateTimeService.getTimeSlice(now(), standardSeconds(5)).plusSeconds(interval);
taskService.scheduleTask(now(), task).toBlocking().first();

int segment = Math.abs(task.getTarget().hashCode() % task.getTaskType().getSegments());
Expand Down

0 comments on commit 13ffcac

Please sign in to comment.