Comparing version 1.0.0 to 1.0.1
@@ -49,5 +49,5 @@ 'use strict'; | ||
this.peers.sort(function (a, b) { | ||
/*this.peers.sort(function (a, b) { | ||
return a.weight - b.weight; | ||
}); | ||
});*/ | ||
@@ -54,0 +54,0 @@ this.maxS = _.maxBy(this.peers, 'weight').weight; |
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "./lib/index.js", | ||
@@ -12,0 +12,0 @@ "keywords": ["weighted", "roundrobin", "round", "robin"], |
@@ -89,3 +89,3 @@ 'use strict'; | ||
pool.update(function (v) { return v === 'B';}, 'B1', 4).should.be.eql(1); | ||
pool.update(function (v) { return v === 'C';}, 'C1', 4).should.be.eql(0); // it was sorted | ||
pool.update(function (v) { return v === 'C';}, 'C1', 4).should.be.eql(2); | ||
@@ -122,3 +122,3 @@ _(0).range(12).map(pool.next.bind(pool)).countBy().value().should.be.eql({ | ||
pool.remove(function (v) { return v === 'C';}).should.be.eql(0); | ||
pool.remove(function (v) { return v === 'C';}).should.be.eql(2); | ||
@@ -125,0 +125,0 @@ _(0).range(7).map(pool.next.bind(pool)).countBy().value().should.be.eql({ |
46250