stage: widen the timeout-reset test deadline
The successful retry in TestDefaultRetriesAndTimeoutResetEachAttempt was racing its own 20ms deadline when the full suite ran in parallel. Keep the two-attempt behavior and give the retry realistic headroom.
This commit is contained in:
@@ -54,7 +54,9 @@ func TestDefaultRetriesAndTimeoutResetEachAttempt(t *testing.T) {
|
||||
if _, err := (ModelStage{Client: client}).Run(context.Background(), def, nil); err == nil || calls != 3 {
|
||||
t.Fatal("default retry count wrong", calls, err)
|
||||
}
|
||||
def.Configs["timeout"] = "20ms"
|
||||
// Leave enough headroom that the successful retry is not itself racing the
|
||||
// deadline when the full suite runs in parallel.
|
||||
def.Configs["timeout"] = "250ms"
|
||||
calls = 0
|
||||
client = generatorFunc(func(ctx context.Context, _ ModelConfig, _ string) (string, error) {
|
||||
calls++
|
||||
|
||||
Reference in New Issue
Block a user