Kaynağa Gözat

test(opencode): remove shell timeout output race (#30974)

Aiden Cline 3 ay önce
ebeveyn
işleme
f8cf8fa983
1 değiştirilmiş dosya ile 2 ekleme ve 4 silme
  1. 2 4
      packages/opencode/test/tool/shell.test.ts

+ 2 - 4
packages/opencode/test/tool/shell.test.ts

@@ -1077,11 +1077,10 @@ describe("tool.shell abort", () => {
         projectRoot,
         Effect.gen(function* () {
           const result = yield* run({
-            command: `echo started && sleep 60`,
+            command: `sleep 60`,
             description: "Timeout test",
             timeout: 500,
           })
-          expect(result.output).toContain("started")
           expect(result.output).toContain("shell tool terminated command after exceeding timeout")
           expect(result.output).toContain("retry with a larger timeout value in milliseconds")
         }),
@@ -1099,12 +1098,11 @@ describe("tool.shell abort", () => {
           expect(tool.description).toContain("commands will time out after 500ms")
           const result = yield* tool.execute(
             {
-              command: `echo started && sleep 60`,
+              command: `sleep 60`,
               description: "Default timeout test",
             },
             ctx,
           )
-          expect(result.output).toContain("started")
           expect(result.output).toContain("exceeding timeout 500 ms")
         }),
       ).pipe(Effect.provide(RuntimeFlags.layer({ bashDefaultTimeoutMs: 500 }))),