summaryrefslogtreecommitdiff
path: root/internal/mcp
diff options
context:
space:
mode:
Diffstat (limited to 'internal/mcp')
-rw-r--r--internal/mcp/handlers_prompt_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/mcp/handlers_prompt_test.go b/internal/mcp/handlers_prompt_test.go
index 17b0607..f3a9d87 100644
--- a/internal/mcp/handlers_prompt_test.go
+++ b/internal/mcp/handlers_prompt_test.go
@@ -885,8 +885,12 @@ func TestServer_Run_InvalidJSON(t *testing.T) {
done <- server.Run()
}()
- // Give time for processing
- time.Sleep(50 * time.Millisecond)
+ // Wait for processing to complete
+ select {
+ case <-done:
+ case <-time.After(2 * time.Second):
+ t.Fatal("server.Run() did not return in time")
+ }
// Should have written error response
if outBuf.Len() == 0 {