V13
This commit is contained in:
@@ -10,14 +10,11 @@ func TestAdaptiveSizerRecoversFromMinimum(t *testing.T) {
|
||||
adaptive: true,
|
||||
adaptSuccesses: 2,
|
||||
}
|
||||
s := newAdaptiveSizer("test", opts)
|
||||
s := newAdaptiveSizer("test", 64, opts)
|
||||
_, next := s.Failure(64)
|
||||
if next != 32 {
|
||||
t.Fatalf("failure should reduce 64 -> 32, got %d", next)
|
||||
}
|
||||
|
||||
// When good=32 and bad=64 are adjacent at the controller's probing
|
||||
// granularity, it deliberately waits 8x longer before testing upward.
|
||||
for i := 0; i < 16; i++ {
|
||||
s.Success(32)
|
||||
}
|
||||
@@ -26,11 +23,9 @@ func TestAdaptiveSizerRecoversFromMinimum(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestWireTokenAllowsEmptyToken(t *testing.T) {
|
||||
if got := wireToken(""); got != "-" {
|
||||
t.Fatalf("empty token wire representation = %q, want '-'", got)
|
||||
}
|
||||
if got := wireToken("secret"); got != "secret" {
|
||||
t.Fatalf("non-empty token changed: %q", got)
|
||||
func TestReconnectZeroMeansPersistent(t *testing.T) {
|
||||
lane := newRequestLane("127.0.0.1:1", 0, 0, 0)
|
||||
if lane.reconnectEvery != 0 {
|
||||
t.Fatalf("reconnectEvery=%d, want 0", lane.reconnectEvery)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user