test(workspace): 프로세스 대기 helper를 안정화한다

This commit is contained in:
toki 2026-08-12 08:00:09 +09:00
parent fec744b4c6
commit d48752a0cc

View file

@ -53,7 +53,9 @@ func TestWorkspaceCommandHelperProcess(t *testing.T) {
if err := os.WriteFile(os.Getenv("IOP_START_FILE"), []byte("started"), 0o600); err != nil {
os.Exit(10)
}
select {}
for {
time.Sleep(time.Hour)
}
case "group":
cmd := exec.Command(os.Args[0], "-test.run=^TestWorkspaceCommandGrandchild$")
cmd.Env = []string{"IOP_WORKSPACE_GRANDCHILD=1"}
@ -64,7 +66,9 @@ func TestWorkspaceCommandHelperProcess(t *testing.T) {
_ = cmd.Process.Kill()
os.Exit(12)
}
select {}
for {
time.Sleep(time.Hour)
}
case "sentinel":
if err := os.WriteFile(os.Getenv("IOP_SENTINEL_FILE"), []byte("target-started"), 0o600); err != nil {
os.Exit(13)
@ -79,7 +83,9 @@ func TestWorkspaceCommandGrandchild(t *testing.T) {
if os.Getenv("IOP_WORKSPACE_GRANDCHILD") == "" {
return
}
select {}
for {
time.Sleep(time.Hour)
}
}
func newCommandRuntime(t *testing.T, root string, outputLimit int64) *Runtime {