We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6836276 commit 41e34d8Copy full SHA for 41e34d8
1 file changed
engine/research_agent_test.go
@@ -5,6 +5,7 @@ import (
5
"errors"
6
"fmt"
7
"strings"
8
+ "sync"
9
"sync/atomic"
10
"testing"
11
"time"
@@ -422,9 +423,12 @@ func TestResearch(t *testing.T) {
422
423
ra := NewResearchAgent(2)
424
ra.Timeout = 5 * time.Second
425
426
+ var mu sync.Mutex
427
var searched []string
428
searchFn := func(q string) (string, error) {
429
+ mu.Lock()
430
searched = append(searched, q)
431
+ mu.Unlock()
432
return "result for " + q, nil
433
}
434
0 commit comments