les: make clientPool.connectedBias configurable (#21305)
This commit is contained in:
@ -91,7 +91,7 @@ func testClientPool(t *testing.T, connLimit, clientCount, paidCount int, randomD
|
||||
}
|
||||
pool = newClientPool(db, 1, &clock, disconnFn)
|
||||
)
|
||||
pool.disableBias = true
|
||||
pool.setConnectedBias(0)
|
||||
pool.setLimits(connLimit, uint64(connLimit))
|
||||
pool.setDefaultFactors(priceFactors{1, 0, 1}, priceFactors{1, 0, 1})
|
||||
|
||||
@ -248,7 +248,7 @@ func TestPaidClientKickedOut(t *testing.T) {
|
||||
clock.Run(time.Millisecond)
|
||||
}
|
||||
clock.Run(time.Second)
|
||||
clock.Run(connectedBias)
|
||||
clock.Run(defaultConnectedBias)
|
||||
if !pool.connect(poolTestPeer(11), 0) {
|
||||
t.Fatalf("Free client should be accectped")
|
||||
}
|
||||
|
Reference in New Issue
Block a user