diff --git a/src/main/java/org/smartregister/model/location/LocationHierarchyTree.java b/src/main/java/org/smartregister/model/location/LocationHierarchyTree.java index 721b596..48b8d24 100755 --- a/src/main/java/org/smartregister/model/location/LocationHierarchyTree.java +++ b/src/main/java/org/smartregister/model/location/LocationHierarchyTree.java @@ -58,12 +58,9 @@ public void addLocation(Location location) { * @param locations */ public void buildTreeFromList(List locations) { - long start = System.currentTimeMillis(); for (Location location : locations) { addLocation(location); } - logger.info(String.format("LocationHierarchyTree.buildTreeFromList took : %d ms", System.currentTimeMillis() - start)); - } public Tree getLocationsHierarchy() { diff --git a/src/test/java/org/smartregister/model/location/LocationHierarchyTreeTest.java b/src/test/java/org/smartregister/model/location/LocationHierarchyTreeTest.java index 4c2e3ad..eb1b8c9 100644 --- a/src/test/java/org/smartregister/model/location/LocationHierarchyTreeTest.java +++ b/src/test/java/org/smartregister/model/location/LocationHierarchyTreeTest.java @@ -52,10 +52,9 @@ public void testAddLocationWithoutChildLocations() { @Test public void testBuildTreeFromList() { - List locationList = TestUtils.getTestLocations(); + List locationList = getLocationList(); LocationHierarchyTree locationHierarchyTree = new LocationHierarchyTree(); locationHierarchyTree.buildTreeFromList(locationList); - Tree tree = locationHierarchyTree.getLocationsHierarchy(); assertNotNull(tree); assertNotNull(tree.getTree()); diff --git a/src/test/java/org/smartregister/model/location/utils/TestUtils.java b/src/test/java/org/smartregister/model/location/utils/TestUtils.java index d5c03f0..b61f5a5 100644 --- a/src/test/java/org/smartregister/model/location/utils/TestUtils.java +++ b/src/test/java/org/smartregister/model/location/utils/TestUtils.java @@ -14,7 +14,6 @@ public static List getTestLocations() { List locationList = new ArrayList<>(); - int parentId = 1; for (Integer i = 1; i < TOTAL_LOCATIONS + 1; i++) {