@@ -96,13 +96,7 @@ func TestCmdNonzeroExit(t *testing.T) {
9696}
9797
9898func TestCmdStop (t * testing.T ) {
99- t .Skip ("FIXME" )
100-
101- // Count to 3 sleeping 5s between counts. The long sleep is because we want
102- // to kill the proc right after count "1" to ensure Stdout only contains "1"
103- // and also to ensure that the proc is really killed instantly because if
104- // it's not then timeout below will trigger.
105- p := cmd .NewCmd (path .Join ("." , "test" , "count-and-sleep" ), "3" , "5" )
99+ p := cmd .NewCmd ("sleep" , "5" )
106100
107101 // Start process in bg and get chan to receive final Status when done
108102 statusChan := p .Start ()
@@ -135,13 +129,13 @@ func TestCmdStop(t *testing.T) {
135129 gotStatus .StopTs = 0
136130
137131 expectStatus := cmd.Status {
138- Cmd : "./test/count-and- sleep" ,
139- PID : gotStatus .PID , // nondeterministic
140- Complete : false , // signaled by Stop
141- Exit : - 1 , // signaled by Stop
142- Error : errors . New ( "signal: terminated" ), // signaled by Stop
143- Runtime : gotStatus .Runtime , // nondeterministic
144- Stdout : []string {"1" },
132+ Cmd : "sleep" ,
133+ PID : gotStatus .PID , // nondeterministic
134+ Complete : false ,
135+ Exit : 1 ,
136+ Error : nil ,
137+ Runtime : gotStatus .Runtime , // nondeterministic
138+ Stdout : []string {},
145139 Stderr : []string {},
146140 }
147141 if diffs := deep .Equal (gotStatus , expectStatus ); diffs != nil {
0 commit comments