Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Background Process Leaking Bug #35

Merged
merged 4 commits into from Mar 25, 2020
Merged

Fixes Background Process Leaking Bug #35

merged 4 commits into from Mar 25, 2020

Conversation

kensipe
Copy link
Member

@kensipe kensipe commented Mar 24, 2020

Fixes #33

Signed-off-by: Ken Sipe kensipe@gmail.com

Signed-off-by: Ken Sipe <kensipe@gmail.com>
bgs = append(bgs, bg)
} else {
logger.Log(stderr.String())
logger.Log(stdout.String())
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no logging if background


logger.Log(stderr.String())
logger.Log(stdout.String())
if bg != nil {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always add bg (this was the main bug)

gerred
gerred previously approved these changes Mar 24, 2020
Copy link
Contributor

@zen-dog zen-dog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for the bug fix.

@@ -393,6 +402,16 @@ func (h *Harness) Stop() {
}
}

if h.bgProcesses != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fun fact, I've asked for a test for this case in the original #23 PR where this bug was introduced ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zen-dog definitely! added!

Signed-off-by: Ken Sipe <kensipe@gmail.com>
pkg/test/harness_test.go Outdated Show resolved Hide resolved
gerred
gerred previously approved these changes Mar 25, 2020
Signed-off-by: Ken Sipe <kensipe@gmail.com>
pkg/test/harness.go Outdated Show resolved Hide resolved
pkg/test/harness.go Outdated Show resolved Hide resolved
Signed-off-by: Ken Sipe <kensipe@gmail.com>

Update pkg/test/harness.go

Co-Authored-By: Aleksey Dukhovniy <adukhovniy@mesosphere.io>

adding quotes to the logs

Signed-off-by: Ken Sipe <kensipe@gmail.com>
Copy link
Contributor

@zen-dog zen-dog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@kensipe kensipe merged commit d28e406 into master Mar 25, 2020
@kensipe kensipe deleted the ken/bg-bug-fix branch March 25, 2020 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kill of Background Processes Failing
3 participants