Skip to content

Commit

Permalink
HugeGraph-81: Fixed small bug in ApiTest that TaskAPI.list() may not …
Browse files Browse the repository at this point in the history
…in order

Change-Id: I386b30d7593d8856fa6d371aeeb6ca59af3ae316
  • Loading branch information
Linary authored and zhoney committed Nov 8, 2018
1 parent f377464 commit 95b60e1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test/java/com/baidu/hugegraph/api/TaskApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
package com.baidu.hugegraph.api;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.junit.After;
import org.junit.Assert;
Expand Down Expand Up @@ -53,7 +55,7 @@ public void testList() {
IndexLabel knowsByDate = schema().getIndexLabel("knowsByDate");
IndexLabel createdByDate = schema().getIndexLabel("createdByDate");

List<Long> taskIds = new ArrayList<>();
Set<Long> taskIds = new HashSet<>();
taskIds.add(rebuildAPI.rebuild(personByCity));
taskIds.add(rebuildAPI.rebuild(personByAge));
taskIds.add(rebuildAPI.rebuild(knowsByDate));
Expand All @@ -62,7 +64,7 @@ public void testList() {
List<Task> tasks = taskAPI.list(null, -1);
Assert.assertEquals(4, tasks.size());

List<Long> listedTaskIds = new ArrayList<>();
Set<Long> listedTaskIds = new HashSet<>();
for (Task task : tasks) {
listedTaskIds.add(task.id());
}
Expand Down

0 comments on commit 95b60e1

Please sign in to comment.