Donate power-of-2-aligned ranges instead of just slicing at the mid-point.

Also fix up space tests to match.
This commit is contained in:
Bryan Boreham committed 2016-05-13 16:27:28 +01:00
1 parent f37e742536
commit 64dc7a1f69
5 files changed
+99 -37

No files matched your search

+1 -1
View File
@@ -343,7 +343,7 @@ func TestNoFrag(t *testing.T) {
allocs[2].actionChan <- func() {
resultChan <- len(allocs[2].ring.Entries)
}
require.True(t, <-resultChan < 5, "excessive ring fragmentation")
require.True(t, <-resultChan < 7, "excessive ring fragmentation")
stopNetworkOfAllocators(allocs, router)
}
}