diff options
Diffstat (limited to 'internal/lsp/chat_prompt_test.go')
| -rw-r--r-- | internal/lsp/chat_prompt_test.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/internal/lsp/chat_prompt_test.go b/internal/lsp/chat_prompt_test.go index 1f7b266..3a1146f 100644 --- a/internal/lsp/chat_prompt_test.go +++ b/internal/lsp/chat_prompt_test.go @@ -3,7 +3,6 @@ package lsp import ( "bytes" "testing" - "time" ) func TestDetectAndHandleChat_UsesConfiguredSystemPrompt(t *testing.T) { @@ -20,10 +19,8 @@ func TestDetectAndHandleChat_UsesConfiguredSystemPrompt(t *testing.T) { // Line that should trigger chat: ends with '>' and previous char in prefixes s.setDocument(uri, "help?>\n") s.detectAndHandleChat(uri) - // Wait briefly for async goroutine to call Chat - for i := 0; i < 20 && len(cap.msgs) == 0; i++ { - time.Sleep(10 * time.Millisecond) - } + // Wait for the background chat goroutine to finish. + s.inflight.Wait() if len(cap.msgs) == 0 { t.Fatalf("expected Chat to be called") } |
