Skip to content

Commit e61753d

Browse files
committed
reduce test flakeihood
1 parent ccfe11c commit e61753d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

mcp/tools/tools_coder_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"encoding/json"
66
"io"
7+
"runtime"
78
"testing"
89

910
"github.com/mark3labs/mcp-go/mcp"
@@ -25,6 +26,9 @@ import (
2526
// Running them in parallel is prone to racy behavior.
2627
// nolint:tparallel,paralleltest
2728
func TestCoderTools(t *testing.T) {
29+
if runtime.GOOS != "linux" {
30+
t.Skip("skipping on non-linux due to pty issues")
31+
}
2832
ctx := testutil.Context(t, testutil.WaitLong)
2933
// Given: a coder server, workspace, and agent.
3034
client, store := coderdtest.NewWithDatabase(t, nil)
@@ -146,6 +150,9 @@ func TestCoderTools(t *testing.T) {
146150
})
147151

148152
t.Run("coder_get_workspace", func(t *testing.T) {
153+
// Given: the workspace agent is connected.
154+
// The act of starting the agent will modify the workspace state.
155+
<-agentStarted
149156
// When: the coder_get_workspace tool is called
150157
ctr := makeJSONRPCRequest(t, "tools/call", "coder_get_workspace", map[string]any{
151158
"workspace": r.Workspace.ID.String(),

0 commit comments

Comments
 (0)