Fix generate test flakyness (#5804)
This commit is contained in:
parent
e8b954c646
commit
69a2d4ccff
1 changed files with 4 additions and 2 deletions
|
@ -73,8 +73,8 @@ func TestGenerateChat(t *testing.T) {
|
|||
getCpuFn: gpu.GetCPUInfo,
|
||||
reschedDelay: 250 * time.Millisecond,
|
||||
loadFn: func(req *LlmRequest, ggml *llm.GGML, gpus gpu.GpuInfoList, numParallel int) {
|
||||
// add 10ms delay to simulate loading
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// add small delay to simulate loading
|
||||
time.Sleep(time.Millisecond)
|
||||
req.successCh <- &runnerRef{
|
||||
llama: &mock,
|
||||
}
|
||||
|
@ -371,6 +371,8 @@ func TestGenerate(t *testing.T) {
|
|||
getCpuFn: gpu.GetCPUInfo,
|
||||
reschedDelay: 250 * time.Millisecond,
|
||||
loadFn: func(req *LlmRequest, ggml *llm.GGML, gpus gpu.GpuInfoList, numParallel int) {
|
||||
// add small delay to simulate loading
|
||||
time.Sleep(time.Millisecond)
|
||||
req.successCh <- &runnerRef{
|
||||
llama: &mock,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue