diff --git a/dotnet/test/E2E/EventFidelityE2ETests.cs b/dotnet/test/E2E/EventFidelityE2ETests.cs index 163a6a6a1..fa034c565 100644 --- a/dotnet/test/E2E/EventFidelityE2ETests.cs +++ b/dotnet/test/E2E/EventFidelityE2ETests.cs @@ -147,8 +147,8 @@ await session.SendAsync(new MessageOptions Prompt = "What is 9+9? Reply with just the number.", }); - var pendingEvent = await pendingMessagesModified; var answer = await TestHelper.GetFinalAssistantMessageAsync(session); + var pendingEvent = await pendingMessagesModified; Assert.NotNull(pendingEvent); Assert.Contains("18", answer?.Data.Content ?? string.Empty); diff --git a/dotnet/test/E2E/SessionMcpAndAgentConfigE2ETests.cs b/dotnet/test/E2E/SessionMcpAndAgentConfigE2ETests.cs index f304810ee..f736c6576 100644 --- a/dotnet/test/E2E/SessionMcpAndAgentConfigE2ETests.cs +++ b/dotnet/test/E2E/SessionMcpAndAgentConfigE2ETests.cs @@ -401,14 +401,6 @@ public async Task Should_Accept_Both_MCP_Servers_And_Custom_Agents() }); Assert.Matches(@"^[a-f0-9-]+$", session.SessionId); - - await session.SendAsync(new MessageOptions { Prompt = "What is 7+7?" }); - - // Use a longer timeout to tolerate slower MCP server spawning on Windows. - var message = await TestHelper.GetFinalAssistantMessageAsync(session, TimeSpan.FromSeconds(120)); - Assert.NotNull(message); - Assert.Contains("14", message!.Data.Content); - await session.DisposeAsync(); } diff --git a/go/internal/e2e/mcp_and_agents_e2e_test.go b/go/internal/e2e/mcp_and_agents_e2e_test.go index 5f8c547fc..8777eec88 100644 --- a/go/internal/e2e/mcp_and_agents_e2e_test.go +++ b/go/internal/e2e/mcp_and_agents_e2e_test.go @@ -422,22 +422,6 @@ func TestCombinedConfigurationE2E(t *testing.T) { t.Error("Expected non-empty session ID") } - _, err = session.Send(t.Context(), copilot.MessageOptions{ - Prompt: "What is 7+7?", - }) - if err != nil { - t.Fatalf("Failed to send message: %v", err) - } - - message, err := testharness.GetFinalAssistantMessage(t.Context(), session) - if err != nil { - t.Fatalf("Failed to get final message: %v", err) - } - - if md, ok := message.Data.(*copilot.AssistantMessageData); !ok || !strings.Contains(md.Content, "14") { - t.Errorf("Expected message to contain '14', got: %v", message.Data) - } - session.Disconnect() }) } diff --git a/nodejs/test/e2e/mcp_and_agents.e2e.test.ts b/nodejs/test/e2e/mcp_and_agents.e2e.test.ts index aa580cdee..2bd9ac6d8 100644 --- a/nodejs/test/e2e/mcp_and_agents.e2e.test.ts +++ b/nodejs/test/e2e/mcp_and_agents.e2e.test.ts @@ -289,11 +289,6 @@ describe("MCP Servers and Custom Agents", async () => { expect(session.sessionId).toBeDefined(); - const message = await session.sendAndWait({ - prompt: "What is 7+7?", - }); - expect(message?.data.content).toContain("14"); - await session.disconnect(); }); }); diff --git a/nodejs/test/e2e/session_fs.e2e.test.ts b/nodejs/test/e2e/session_fs.e2e.test.ts index 3987012b1..16bb22db7 100644 --- a/nodejs/test/e2e/session_fs.e2e.test.ts +++ b/nodejs/test/e2e/session_fs.e2e.test.ts @@ -216,12 +216,12 @@ describe("Session Fs", async () => { expect(contentBefore).not.toContain("checkpointNumber"); await session.rpc.history.compact(); - await expect.poll(() => compactionEvent).toBeDefined(); + await expect.poll(() => compactionEvent, { timeout: 30_000 }).toBeDefined(); expect(compactionEvent!.data.success).toBe(true); // Verify the events file was rewritten with a checkpoint via sessionFs await expect - .poll(() => provider.readFile(eventsPath, "utf8")) + .poll(() => provider.readFile(eventsPath, "utf8"), { timeout: 30_000 }) .toContain("checkpointNumber"); }); }); diff --git a/python/e2e/test_mcp_and_agents_e2e.py b/python/e2e/test_mcp_and_agents_e2e.py index 5d1275ad6..b61e5b2eb 100644 --- a/python/e2e/test_mcp_and_agents_e2e.py +++ b/python/e2e/test_mcp_and_agents_e2e.py @@ -8,7 +8,7 @@ from copilot.session import CustomAgentConfig, MCPServerConfig, PermissionHandler -from .testharness import E2ETestContext, get_final_assistant_message +from .testharness import E2ETestContext TEST_MCP_SERVER = str( (Path(__file__).parents[2] / "test" / "harness" / "test-mcp-server.mjs").resolve() @@ -219,10 +219,6 @@ async def test_should_accept_both_mcp_servers_and_custom_agents(self, ctx: E2ETe assert session.session_id is not None - await session.send("What is 7+7?") - message = await get_final_assistant_message(session) - assert "14" in message.data.content - await session.disconnect() async def test_should_handle_custom_agent_with_tools_configuration(self, ctx: E2ETestContext): diff --git a/test/snapshots/mcp-and-agents/should_accept_both_mcp_servers_and_custom_agents.yaml b/test/snapshots/mcp-and-agents/should_accept_both_mcp_servers_and_custom_agents.yaml index 60d1eadea..056351ddb 100644 --- a/test/snapshots/mcp-and-agents/should_accept_both_mcp_servers_and_custom_agents.yaml +++ b/test/snapshots/mcp-and-agents/should_accept_both_mcp_servers_and_custom_agents.yaml @@ -1,10 +1,3 @@ models: - claude-sonnet-4.5 -conversations: - - messages: - - role: system - content: ${system} - - role: user - content: What is 7+7? - - role: assistant - content: 7 + 7 = 14 +conversations: [] diff --git a/test/snapshots/mcp_and_agents/should_accept_both_mcp_servers_and_custom_agents.yaml b/test/snapshots/mcp_and_agents/should_accept_both_mcp_servers_and_custom_agents.yaml index 60d1eadea..056351ddb 100644 --- a/test/snapshots/mcp_and_agents/should_accept_both_mcp_servers_and_custom_agents.yaml +++ b/test/snapshots/mcp_and_agents/should_accept_both_mcp_servers_and_custom_agents.yaml @@ -1,10 +1,3 @@ models: - claude-sonnet-4.5 -conversations: - - messages: - - role: system - content: ${system} - - role: user - content: What is 7+7? - - role: assistant - content: 7 + 7 = 14 +conversations: []