test(workspace): 프로세스 대기 helper를 안정화한다
This commit is contained in:
parent
fec744b4c6
commit
d48752a0cc
1 changed files with 9 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue