Skip to content

Commit

Permalink
fix: TaskScheduler.delete test caller sets the force parameter to false
Browse files Browse the repository at this point in the history
  • Loading branch information
VGalaxies authored and imbajin committed Nov 10, 2023
1 parent 8b3624a commit dd44f70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void setup() {

Iterator<HugeTask<Object>> iter = scheduler.tasks(null, -1, null);
while (iter.hasNext()) {
scheduler.delete(iter.next().id(), true);
scheduler.delete(iter.next().id(), false);
}
}

Expand All @@ -77,7 +77,7 @@ public void testTask() throws TimeoutException {
Assert.assertFalse(task.completed());

Assert.assertThrows(IllegalArgumentException.class, () -> {
scheduler.delete(id, true);
scheduler.delete(id, false);
}, e -> {
Assert.assertContains("Can't delete incomplete task '88888'",
e.getMessage());
Expand Down Expand Up @@ -107,7 +107,7 @@ public void testTask() throws TimeoutException {
Assert.assertEquals("test-task", iter.next().name());
Assert.assertFalse(iter.hasNext());

scheduler.delete(id, true);
scheduler.delete(id, false);
iter = scheduler.tasks(null, 10, null);
Assert.assertFalse(iter.hasNext());
Assert.assertThrows(NotFoundException.class, () -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ protected void clearSchema() {

TaskScheduler scheduler = this.graph.taskScheduler();
scheduler.tasks(null, -1, null).forEachRemaining(elem -> {
scheduler.delete(elem.id(), true);
scheduler.delete(elem.id(), false);
});
}

Expand Down

0 comments on commit dd44f70

Please sign in to comment.