Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Revert "Wait for commandline after killing (#19)" #20

Merged
merged 2 commits into from Jul 24, 2020
Merged

Conversation

fkorotkov
Copy link
Contributor

The latest changes were failing integration tests of Cirrus CI. Reverted and added a test.

Probably need reconsider #16

@fkorotkov fkorotkov requested a review from edigaryev July 24, 2020 01:33
@edigaryev
Copy link
Contributor

It seems to be working right, but due to this goroutine:

go func() {
// give time to flush logs
time.Sleep(1 * time.Second)
done <- cmd.Wait()
}()

The Wait() is almost always called twice here:

err = cmd.Wait()
if err != nil {
handler([]byte(fmt.Sprintf("\nFailed to wait for killed shell: %s", err)))
}

Which triggers a sanity check inside Wait() (https://github.com/golang/go/blob/78c20c81aaa7d8d8a4aa2132806f51fb68f33a1e/src/os/exec/exec.go#L502-L505) and results in an unexpected logger output in tests.

I've created #21 to fix this.

@fkorotkov fkorotkov merged commit f30058d into master Jul 24, 2020
@fkorotkov fkorotkov deleted the revert-wait branch July 24, 2020 13:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants