Skip to content

Commit 63fe24d

Browse files
Apply stderr-capture sleep to Rust/Go/Python/.NET e2e tests
The shared snapshot should_capture_stderr_output.yaml was re-recorded with 'sleep 0.5' to make stdout/stderr interleave deterministic. Update the remaining SDK e2e tests that exercise this snapshot to send the matching command. Java has no equivalent test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3c0e58d commit 63fe24d

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

dotnet/test/E2E/BuiltinToolsE2ETests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public async Task Should_Capture_Stderr_Output()
4949
var session = await CreateSessionAsync();
5050
var msg = await session.SendAndWaitAsync(new MessageOptions
5151
{
52-
Prompt = "Run 'echo error_msg >&2; echo ok' and tell me what stderr said. Reply with just the stderr content.",
52+
Prompt = "Run 'echo error_msg >&2; sleep 0.5; echo ok' and tell me what stderr said. Reply with just the stderr content.",
5353
}, SendTimeout);
5454
Assert.Contains("error_msg", msg?.Data.Content ?? string.Empty);
5555
}

go/internal/e2e/builtin_tools_e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func TestBuiltinToolsE2E(t *testing.T) {
6868
sendCtx, cancel := context.WithTimeout(t.Context(), sendTimeout)
6969
defer cancel()
7070
msg, err := session.SendAndWait(sendCtx, copilot.MessageOptions{
71-
Prompt: "Run 'echo error_msg >&2; echo ok' and tell me what stderr said. Reply with just the stderr content.",
71+
Prompt: "Run 'echo error_msg >&2; sleep 0.5; echo ok' and tell me what stderr said. Reply with just the stderr content.",
7272
})
7373
if err != nil {
7474
t.Fatalf("SendAndWait failed: %v", err)

python/e2e/test_builtin_tools_e2e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async def test_should_capture_stderr_output(self, ctx: E2ETestContext):
4747
)
4848
try:
4949
message = await session.send_and_wait(
50-
"Run 'echo error_msg >&2; echo ok' and tell me what stderr said. "
50+
"Run 'echo error_msg >&2; sleep 0.5; echo ok' and tell me what stderr said. "
5151
"Reply with just the stderr content.",
5252
timeout=SEND_TIMEOUT,
5353
)

rust/tests/e2e/builtin_tools.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async fn should_capture_stderr_output() {
6262
.expect("create session");
6363

6464
let msg = session
65-
.send_and_wait(message("Run 'echo error_msg >&2; echo ok' and tell me what stderr said. Reply with just the stderr content."))
65+
.send_and_wait(message("Run 'echo error_msg >&2; sleep 0.5; echo ok' and tell me what stderr said. Reply with just the stderr content."))
6666
.await
6767
.expect("send")
6868
.expect("assistant message");

0 commit comments

Comments
 (0)