Skip to content

Commit

Permalink
use zero as default score in DynamicEndpointSnitch
Browse files Browse the repository at this point in the history
  • Loading branch information
DikangGu committed Feb 21, 2018
1 parent cc43677 commit 6cfa9f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -235,7 +235,7 @@ private void sortByProximityWithBadness(final InetAddressAndPort address, List<I
{
Double score = scores.get(inet);
if (score == null)
continue;
score = 0.0;
subsnitchOrderedScores.add(score);
}

Expand Down
Expand Up @@ -100,7 +100,7 @@ public void testSnitch() throws InterruptedException, IOException, Configuration
assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3, host4)));

setScores(dsnitch, 20, hosts, 10, 10, 10);
order = Arrays.asList(host1, host2, host3, host4);
order = Arrays.asList(host4, host1, host2, host3);
assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3, host4)));
}
}

0 comments on commit 6cfa9f1

Please sign in to comment.